SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Evangelist silversurfer5150's Avatar
    Join Date
    Aug 2010
    Posts
    532
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    jquery / prototype plugin conflict

    Hey there guys:

    I have a conflict between a text slider plugin that uses jquery and the lightbox plugin that uses prototype. Please click on the link below for full details:

    http://www.cbl.com/whe/sliderandlbox/index.html

    Can anyone help?

    thanks

    Will

  2. #2
    SitePoint Wizard bronze trophy chris.upjohn's Avatar
    Join Date
    Apr 2010
    Location
    Melbourne, AU
    Posts
    2,183
    Mentioned
    17 Post(s)
    Tagged
    1 Thread(s)
    There's a simple fix, with jQuery you can set a custom var or use jQuery to stop other scripts from conflicting with it. Simply change all the jQuery $ referees

    Code JavaScript:
    jQuery().ready()

    etc etc....

    Also the way you declare your ready state can be shorted to

    Code JavaScript:
    jQuery(function(){
        // Code Here
    });

    as your not directly declaring any part of the JS to wait till the page is finished loading. You can read about jQuery.noConflict more here http://api.jquery.com/jQuery.noConflict/
    Blog/Portfolio | Evolution Xtreme | DFG Design | DFG Hosting | CSS-Tricks | Stack Overflow | Paul Irish
    Having lame problems with your code? Let us help by using a jsFiddle


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •