Help with jQuery.noConflict()

Discussion in 'Web Design and Development' started by dalcorn1, May 20, 2011.

  1. dalcorn1 macrumors regular

    Joined:
    Jul 10, 2008
    #1
    I'm pulling my hair out with this. I'm trying to get a lightbox working on my website alongside a jQuery tooltip, however when the tooltip is running the lightbox no long works and just links to a new page of one image. If I remove the attached tool.js (the file that controls the tool tip) the lightbox works again but the tool tip obviously doesn't.

    I presume this is a jQuery conflict and have been looking up how to resolve it, finding a variety of different solutions, but no proper explanation how to implement them.

    I just have no idea what to do with that. I've tried putting div ids in place of the "div" and "someid" reference points and all that did was hide the content completely.

    This an example of the page I want to implement it on:

    http://testing.danielalcorn.com/projects/worldcup.php

    The tool tip resides in a php.include on the right hand side, the code of which is this:



    Am i looking for the right information or is there a better way to sort the issue than jQuery?

    Any help will be greatly appreciated.
     
  2. dalcorn1 thread starter macrumors regular

    Joined:
    Jul 10, 2008
  3. iphonepiephone macrumors regular

    Joined:
    Oct 9, 2009
    #3
    As a relative n00b to js and jQuery, may I ask why you use "jQuery" as opposed to "$"?
     
  4. angelwatt Moderator emeritus

    angelwatt

    Joined:
    Aug 16, 2005
    Location:
    USA
    #4
    It's part of the "noConflict" of jQuery. Other libraries also use $ as a function name (Dojo I believe) so there in lies the conflict. This provides a way of using both libraries on the same page.
     
  5. iphonepiephone macrumors regular

    Joined:
    Oct 9, 2009
    #5
    Ah, kapiche ;)
     

Share This Page