Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums JavaScript Need Solution: Anything Slider (jquery.min.js) conflicts with prototype.js

  • This topic is empty.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #34114
    Carley
    Member

    I have the Anything Slider working fine. I wanted to add another feature that uses prototype.js. It works fine when by itself. When I combined the two on a page, I cannot get Anything Slider to work. I’ve tried the jQuery.noConflict(); – – I must not have it correct, because my prototype script works great, but the anything slider won’t work. Any solutions?

    #85859
    Mottie
    Member

    Hi Carley!

    I’m guessing the problem is that AnythingSlider is being called using a “$” instead of “jQuery”. Try this:

    jQuery('#slider').anythingSlider();

    Or if you want to get fancy, you can assign a variable to the no conflict mode, like this:

    var $j = jQuery.noConflict();
    $j('#slider').anythingSlider();

    I hope that helps! :)

    #85862
    Carley
    Member

    Thank you! I had tried that and it didn’t work, but you brought it to my attention the “called using a ‘$’ instead.” So I looked through the code and sure enough, I found…

    Once I removed this code and kept the no conflict script in, it works! Thanks, Mottie!

Viewing 3 posts - 1 through 3 (of 3 total)
  • The forum ‘JavaScript’ is closed to new topics and replies.