Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 3 of 3
  1. #1
    Junior Member
    Join Date
    Jun 2011
    Posts
    2
    Member #
    28167
    hello there
    im building a website for a gaming clan and have a dropdown menu and a light box using two sets of java script which on there own work but when i have both sets in use at the same time the light box script doesnt work. i had to use a second menu as the first one only worked in IE but i still had the same problem
    i have searched the interwebz and have found alot of people with similar problems and different answers given and i have tried and failed using the answers given, but what i keep finding is this being mentioned .noConflict() and a link to this site http://api.jquery.com/jQuery.noConflict/ but it might as well be in french as i have no idea how to impliment the code.
    these are the scripts i am using
    <script type="text/javascript" src="js lightbox/js/mootools.js"></script>
    <script type="text/javascript" src="js lightbox/js/slimbox.js"></script>
    <script type="text/javascript" src="test.js"></script>
    this is the link to the site
    http://www.ilovebarbieclan.webspace....com/Test2.html#
    this is the site i got the menu from
    http://www.webdesigndev.com/web-deve...u-you-ever-saw
    any help would be much appreciated

  2.  

  3. #2
    Junior Member
    Join Date
    Jun 2011
    Posts
    2
    Member #
    28167
    i tried another light box http://www.digitalia.be/software/slimbox2 and it installed with out any conflict with the menu, which was the 3rd light box i tried so i guess they have put a fix in the code to avoid the javascript conflict when multiple scripts are used

  4. #3
    Senior Member paintingtheweb's Avatar
    Join Date
    Jul 2007
    Location
    Las Vegas
    Posts
    128
    Member #
    15503
    I'm glad you fixed your problem, but to answer the first question about jQuery.noConflict...What this does is returns the control of the "$" variable to whatever script wants to use it. "$" is used in a lot of other scripts and is actually unnecessary for jquery (it's just an alias for the jquery object). When you use noConflict, you should no longer use $() for anything related to jquery, rather use jQuery() instead. Hope that helps...


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 10:57 PM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com