Quantcast
Channel: 916 Networks
Viewing all articles
Browse latest Browse all 63

JQuery to modify CSS already rendered in WordPress

$
0
0

Sometimes a WordPress plugin will use JQuery to set dimensions and other attributes on the fly. This means you cannot override some of these classes or IDs with CSS in a stylesheet file.

In these cases, you can use JQuery to modify after the output has started. This works quite well. Place right before the closing head tag. Make sure to use the script tags around your JQuery too.


jQuery(document).ready(function(){
jQuery('.dropdown_ver_menu').css('right', '-280px');
jQuery('.dropdown_ver_menu ul ul').css('max-height', 'none');
jQuery('.dropdown_ver_menu ul ul').css('display', 'block');
});

The above modifies the CSS values for right, max-height and display.

The post JQuery to modify CSS already rendered in WordPress appeared first on 916 Networks.


Viewing all articles
Browse latest Browse all 63

Trending Articles