dcsimg
www.webdeveloper.com
Results 1 to 2 of 2

Thread: Script Clash?

Hybrid View

  1. #1
    Join Date
    Nov 2008
    Posts
    3

    Question Script Clash?

    Trying to create a page with two types of featured content sliders...

    However both of them seem to not want to exist next to the other...

    I have narrowed the issue down to the javascript that works the features because if i remove the javascript for one of them...the other one works. Also which ever feature has the script load first is the one that does not work...so there must be something in the codes that throws the browser off after both of them are loaded.

    Can anyone offer any advice aroudn this problem??

    The page effected is: http://krizzyb.com/videos2.php (The top feature should slide as a carousel)

    Apologies for the mess of code but it is just a prototype page.

    EDIT: By messing around with the scripts, taking one off or moving it about the page i have narrowed the two scrips down...the confict seems to be happening with the "compressed.js" script (http://krizzyb.com/compressed.js) and the "jquery.min.js" script (http://ajax.googleapis.com/ajax/libs.../jquery.min.js) if this is any help.

    If i can provide anymore info let me know...

    Thanks
    Last edited by KrizzyB; 09-03-2009 at 10:37 PM. Reason: Further Info

  2. #2
    Join Date
    Apr 2008
    Location
    UK
    Posts
    76
    jQuery and whatever is in compressed.js are battling for ownership of the $ variable.

    jQuery has a noConflict function, which releases control of the $ variable.

    Just do jQuery.noConflict() after including the jQuery javascript file, but before including compressed.js.

    From then on you would have to use jQuery using the jQuery function, rather than $.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

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



Recent Articles