简体   繁体   中英

Modify inline styles added by jquery isotope

I am modifying a theme to work with RTL. On a gallery page there are certain inline styles added to elements probably by isotope because you can filter the pictures by their type.

html source

<div class="met_recent_work col-sm-4 branding">

resulting html in browser

<div class="met_recent_work col-sm-4 webdesign isotope-item" style="position: absolute; left: 0px; top: 0px; transform: translate3d(0px, 0px, 0px);">

How can I modify those properties?

为此使用jquery

$('.met_recent_work').css('position', 'relative');

You can change it with Jquery, when DOM loaded completely:

$(function(){
  $('.met_recent_work').css('position', 'relative');
});

!important将覆盖内联样式。

.met_recent_work { position: relative !important; }

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM