• Resolved Nikodemsky

    (@nikodemsky)


    Hi,

    since i have changed plugins folder name i’m getting error:
    gallery-justified.js:40 Uncaught TypeError: $gallery.removeClass(...).justifiedGallery is not a function
    – and i’m not sure how should i deal with that. Justified gallery template doesn’t work because of that problem.

    Any help with that?

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author bradvin

    (@bradvin)

    Hi,

    Link to your gallery?
    Can you try to clear your CSS optimizations from the settings page.

    Thread Starter Nikodemsky

    (@nikodemsky)

    domki-leba.com.pl/cennik/
    – if i remove this “messed up” gallery, then rest of them works properly(if you inspect code, then you can see, that there’s more galleries on the page); it’s almost like this one particular gallery(id 2417) is corrupted.

    Already tried clearing CSS optimizations.

    Plugin Author bradvin

    (@bradvin)

    I had a look and it seems to be a duplicate jquery problem.

    So because you are loading 2 different versions of jquery (1 bundled with WP which is correct and 1 from your theme) the justified gallery jquery plugin is binding to the first version, and then when its called later the 2nd jquery is being used which throws the error.

    I would recommend you get the theme author to remove it’s own bundled jquery and use the version bundled in WP.

    You can see another JS error on your page ‘tooltip is not a funcion’

    Thread Starter Nikodemsky

    (@nikodemsky)

    I’ve tried to deregister jquery from my theme and overwrite it with wordpress one via:

    add_action('wp_enqueue_scripts', 'update_jquery_for_cherry_framework', 11);
    function update_jquery_for_cherry_framework() {
       wp_deregister_script('jquery');
       wp_register_script('jquery', '/wp-includes/js/jquery/jquery.js', false, false, true);
       wp_enqueue_script('jquery');
    }

    Jquery is loaded only from wordpress; i know, that it’s not 100% correct approach but shouldn’t it work now?

    Thanks for the fast response btw.

    Thread Starter Nikodemsky

    (@nikodemsky)

    Ok, fixed it.

    The problem was tablepress with “datatables js” enabled for tables, it was causing the problem. Simply unchecking it was sufficient.

    Sorry fot the trouble and i hope, that it might help someone in future.

    Plugin Author bradvin

    (@bradvin)

    glad you fixed it and no problem at all.

    We have actually made a change to how we initialize foobox to cater for multiple versions of jquery on the page, so even though it is not ideal to have 2 jquerys included on the page, foobox should still work happily. That is coming in v1.1.9 to be released today

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Uncaught TypeError: $gallery.removeClass’ is closed to new replies.