The problem started when I realized that Woocommerce's Flexslider edits one of the DIV tags and it gives the width of 1600%. I didn't want this attribute. That's why I prepared a code to fix it along with some other attributes:
jQuery(document).ready(function($){
$( '.slides' ).css("width", "");
$( '.slides' ).css("margin-left", "");
$( '.slides' ).css("margin-right", "126px");
});
I saved this code in a file named final.js
inside the theme's js directory. But I haven't been able to make it work! I read an article about enqueue-ing (if there's such a verb) the scripts, here. I tried and it seems like, the script will be included inside the header among the other scripts. But no matter if it's at the top or the bottom of the other ones, it won't work!
I tried to put it at the bottom of the page without using the enqueue method. All I could get from my efforts is adding margin-right
to the class slides
. This is not enough. Which ever code is changing this class, is firing after my custom script and doesn't let it happen.
Do you have any suggestions to make this this thing work? Here's the link to site if you want to have a look (should look for: <div id="carousel" class="flexslider"><ul class="slides">
).
Thanks!
Aucun commentaire:
Enregistrer un commentaire