WordPress.org

Ready to get started?Download WordPress

Forums

NextGEN Gallery
Jquery 1.9.0 not working with Thickbox (5 posts)

  1. Barbara Talbot
    Member
    Posted 2 years ago #

    Love the plugin and have been using it for over a year now for many of my builds. There are sometimes a few quirks with Javascript clashes, but overall it's pretty solid. Unfortunately though, I just ran into a jQuery issue.

    I was using Roots WordPress Theme with jQuery 1.8.3 and NextGen without issues. Once I updated my build to jQuery 1.9.0 the thickbox popups no longer work. (Shutter still works.) Also before I updated to 1.9.0 JJ NextGen JQuery Carousel was working perfectly, now it is broken. (I can't provide a link because my client's site is still in development.)

    Firebug debugging is giving the following errors in thickbox.js & jquery.jcarousel.min.js
    thickbox.js
    jQuery(...).live is not a function
    Line 23 is below

    //add thickbox to href & area elements that have a class of .thickbox
    function tb_init(domChunk){
    jQuery(domChunk).live('click', tb_click);

    jquery.jcarousel.min.js
    i.browser is undefined
    Line 16

    I updated to 1.9 because with that selectivizr now supports some :nth selectors for IE8 and under, that were not available before. Is anyone else experiencing this issue and know how to fix it? Maybe an update will be coming out soon? Any help is appreciated. Thanks!

    http://wordpress.org/extend/plugins/nextgen-gallery/

  2. UVE
    Member
    Posted 2 years ago #

    As of jQuery 1.7, the .live() method is deprecated.
    So there is a fast solution that is actually working for me.
    Find this funcion in wp-includes\js\thickbox\thickbox.js and change the function:

    function tb_init(domChunk){
     jQuery(domChunk).live('click', tb_click);
    }

    Replacing the "live" method for "on", like this:

    function tb_init(domChunk){
    	jQuery(domChunk).on('click',tb_click);
    }

    Good luck!

    PS.- If you are using Nivo-Slider, the jquery.nivo.slider.js will need similar changes.

  3. Barbara Talbot
    Member
    Posted 2 years ago #

    Thank you for the response UVE! I actually ended up throwing away 1.9 for this build as the deadline was short. But I am starting a new one that will also use NextGEN and I'll try out your suggestion. I'll let you know how it goes!

  4. ryanbrough
    Member
    Posted 2 years ago #

    Hi
    I'm having this issue too. I've changed the live statement to on in both thickbox.js and in the nivo.slider.js (in 3 places) and still no luck.

    I have a feeling it might be my client's awful host, but are there any other suggestions on how to get this working? Host is on IIS6 with no ability to upgrade / change :(

    I can provide link to site if anyone can help?

    Cheers
    Ryan

  5. Brooke Dukes
    Member
    Posted 1 year ago #

    There is a ticket for this http://core.trac.wordpress.org/ticket/22975 and it appears to be fixed in wp 3.6. For anyone using thickbox with 3.5 or below I would recommend getting a copy from the 3.6 trunk.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic