SitePoint Sponsor

User Tag List

Results 1 to 8 of 8
  1. #1
    SitePoint Enthusiast
    Join Date
    May 2010
    Location
    UK
    Posts
    62
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Lightbox not running alongside tablesort

    Hello,

    I've tried a few differently-termed searches on this forum, but drawn a bit of a blank in terms of finding enough info to sort my problem. Apologies, however, if the answer is out there (which I'm sure it is!) and I just haven't found it....

    Anywho...

    I've done a simple script to list some pets for sale (here: http://tinyurl.com/2cx9xye) but am having right problems getting the "tablesorter" AND "Lightbox" to run alongside each other. At the moment it's either/or.

    Now, from my searching, I gather that its because of the inclusion of both "prototype" and "jquery" (which I've hosted together on my central script-serving space in this example, and linked-to from the <head>)

    Is anyone able to suggest what I can do, to get both of these working?

    Currently, it's only the lightbox. However, in this example here: http://tinyurl.com/354vpoa, because I've flipped the order of the javascript file calls in the header, it's the "tablesorter" which works and the "lightbox" which breaks (presumably because the latter file call over-rides the earlier).

    Any ideas? :-)
    Thanks a million!

    Alex

  2. #2
    SitePoint Enthusiast
    Join Date
    Jul 2010
    Location
    Kingdom of Saudi Arabia
    Posts
    78
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    If you are using jQuery with either mootools or prototype, just use jQuery("#el").method() instead of the usual $("#el").method() ...

  3. #3
    SitePoint Enthusiast
    Join Date
    May 2010
    Location
    UK
    Posts
    62
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by modtup View Post
    If you are using jQuery with either mootools or prototype, just use jQuery("#el").method() instead of the usual $("#el").method() ...
    Hey Modtup,

    Thanks for replying.
    How do I implement this?

    Al

  4. #4
    SitePoint Enthusiast
    Join Date
    Jul 2010
    Location
    Kingdom of Saudi Arabia
    Posts
    78
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Post the code here, I'll give you an example...can't see your post or screenshot as tinyurl is blocked in KSA.

  5. #5
    SitePoint Enthusiast
    Join Date
    May 2010
    Location
    UK
    Posts
    62
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by modtup View Post
    Post the code here, I'll give you an example...can't see your post or screenshot as tinyurl is blocked in KSA.
    This was the first link: Link1
    And this the second: Link2

  6. #6
    SitePoint Enthusiast
    Join Date
    Jul 2010
    Location
    Kingdom of Saudi Arabia
    Posts
    78
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Can you try below...thanks.
    Code javascript:
    jQuery(document).ready(function() 	{ 
        jQuery("#products").tablesorter(); 
    });

  7. #7
    SitePoint Enthusiast
    Join Date
    May 2010
    Location
    UK
    Posts
    62
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by modtup View Post
    Can you try below...thanks.
    Code javascript:
    jQuery(document).ready(function() 	{ 
        jQuery("#products").tablesorter(); 
    });
    Fab, thanks so much - sorted!
    What was the conflict, could you explain so i know? I'm assuming it was because of "prototype" and "jquery"?

    Alex

  8. #8
    SitePoint Enthusiast
    Join Date
    Jul 2010
    Location
    Kingdom of Saudi Arabia
    Posts
    78
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    What was the conflict, could you explain so i know?
    "$" is commonly used by both prototype, mootools(I think) and jQuery...so using "jQuery" object ensures that no you're always on jQuery namespace not with other libraries.


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
  •