Javascript script not working on certain pages in ekmpowershop

Hi There,

I’m redesigning a website for a client in ekmpowershop and I’ve set up a small jquery script to add the class “test” to the parents of all uls that have a child containing a div with a class of .sub. This is with the purpose of adding an arrow where a dropdown menu exists.

Now, the problem is that this is working on all pages except for the product pages, which also happen to contain a nivo slider jquery slideshow. I cannot for the life of me figure out what exactly is causing this problem but I need a solution desperately as the site is live and I’m unable to undo any changes due to the nature of ekm powershop

Not only is this script not working, the jquery.hoverIntent.minified.js script isn’t working either and again, only on the product page.

Here’s the small script:

<script type=“text/javascript”>
$(document).ready(function() {
$(“ul li .sub”).parent().addClass(“test”);

$(“a[href=‘travel-accessories-51-c.asp’]”).attr(‘href’, ‘accessories-26-c.asp’);

});

</script>

Any help will of course be most appreciated!

Thanks a lot,
Dan

Something else has taken over the $ variable.

Use this wrapper and you should be safe:


jQuery(function ($) {
    // jQuery code in here can safely use $
});

Man you’re seriously a lifesaver. I owe you one!