Results 1 to 6 of 6

Thread: Accordion menu not working properly when used with lightbox

  1. #1
    Join Date
    Sep 2008
    Posts
    4
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default Accordion menu not working properly when used with lightbox

    1) Script Title: Accordion Menu

    2) Script URL (on DD): http://www.dynamicdrive.com/dynamici...m?expandable=0

    3) Describe problem:
    Hello,
    I have this strange problem with accordion menu when used on pages with lighbox, that it collaps all unfolded submenus. I've changed all $ to j$ in ddaccordion.js and added var $j = jQuery.noConflict() as mentioned in this thred, but it didn't solve problem.
    Project that I'm working on could be found on http://nehlsen.nunointeractive.eu
    and the problem could be seen on pages with galleries under PROFIL FIRMY/galeria3

    Regards,
    luke

  2. #2
    Join Date
    Jan 2008
    Posts
    4,168
    Thanks
    28
    Thanked 628 Times in 624 Posts
    Blog Entries
    1

    Default

    Try this:
    Code:
    var j$ = jQuery;
    j$.noConflict();
    Jeremy | jfein.net

  3. #3
    Join Date
    Sep 2008
    Posts
    4
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    Unfortunetly didn't help
    luke

  4. #4
    Join Date
    Jan 2008
    Posts
    4,168
    Thanks
    28
    Thanked 628 Times in 624 Posts
    Blog Entries
    1

    Default

    Try:
    Code:
    var j$ = jQuery;
    jQuery.noConflict();
    Jeremy | jfein.net

  5. #5
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    That doesn't really work, at least not that I've seen. There is apparently some other conflict in addition to control of the $ variable. I believe it lies in scriptaculous or effects but I've been unable to track it down and positively identify it, let alone come up with a fix.

    What I've been recommending is to switch to a jQuery based Lightbox like:

    http://leandrovieira.com/projects/jquery/lightbox/

    or:

    http://plugins.jquery.com/project/jquerylightbox_bal

    Whichever you use, make sure you have only one external tag on your page for jQuery, and that it comes before the scripts that use it. Also, with:

    http://leandrovieira.com/projects/jquery/lightbox/

    The download has been updated to version 5, but the instructions on the site are still for version 4. I prefer this one, but be sure you are linking to the script in the download archive, not to the version 4 one as mentioned on the site.

    Switching to a jQuery based lightbox for a page or pages already using jQuery for another script will also result in significant code savings, speeding the loading of your page.

    You can even use the newer version 3 jQuery, which runs faster. If you do that, and are using the version 5 script for Lightbox I was mentioning, change (in its initialization on your page):

    Code:
    $('a[@rel*=lightbox]').lightBox();
    to:

    Code:
    $('a[rel*=lightbox]').lightBox();
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  6. The Following User Says Thank You to jscheuer1 For This Useful Post:

    dd_lx (02-16-2009)

  7. #6
    Join Date
    Sep 2008
    Posts
    4
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    Dear John,
    Thank You for helping me solving this problem.
    Right now I know, that combaining those two scripts will not work.
    At this time I'll try to go for Slimbox gallery scritp that uses mootools, becouse it was bounded with MaxiGallery that works with MODX CMS that I'm using.
    If it will not work, than I'll go for sugested, jquery based gallery script.
    Regards,
    luke

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
  •