I am attempting to apply inline styles to a div using jQuery. The current state of the div, as seen in Firebug, is shown below:
https://i.sstatic.net/rqhIc.jpg
My goal is to retain the existing CSS while adding margin-left:0
and margin-right:0
to the current class. I have tried the following jQuery code, but it has not been successful:
jQuery(document).ready(function($){
$(".testimonial_wrapper").css({'margin-left':'auto', 'margin-right':'auto'});
});
Are there alternative methods to achieve this? (please keep in mind that I am modifying a WordPress website and the divs are being generated by a page builder plugin)