// Add CSS properties into .AddCssIntoThisClass $(".AddCssIntoThisClass").css({"height": "64px", "overflow": "hidden"}); $('html, body').css({ overflow: 'hidden',height: '100%'});
/*important - to overwrite important CSS*/ $( '.myclass' ).each(function () { this.style.setProperty( 'height', '0px', 'important' ); });
//Add CSS attr to elements $(document).ready(function() { $('#div1, #div2').attr('class','NewCSSClass'); });
//Close div with css method, e.g toggle menu $('.business-details__toggle').click(function() { $('.sidr.left').css('left', '0rem'); }); $('.sidr__toggle').click(function() { $('.sidr.left').css('left', '-44rem'); });
//Add style attributes to specific element $("#page-content").find(".details").css( { marginLeft : "30px", marginRight : "30px" } ); //or $("#page-content").find(".details").css( 'min-height', '128px');
//To change only style attributes $('.handle').attr('style','left: 300px');
//To add style properties $('.handle').css('left', '300px');
$('#scroll-header').css({"height": "52px", "position": "fixed", "top": "0", "z-index": "2002", "width": "100%"});
if ($('.skin-ads').length) { $('.new-theme').css({'top': '300px', 'margin-bottom': '300px', 'transition': 'all .5s .2s ease-in-out'}); }
$('#block-block-5, #block-block-10, #block-block-11').css('border-top', '#fff solid 25px');