Support » Plugin: WP Featherlight - A Simple jQuery Lightbox » Console Uncaught TypeError

  • Resolved iNexi

    (@inexi)


    What’s going on with the below error in the console? I’m initiating it via the console like:

    jQuery.featherlight("/wp-content/uploads/3.jpg");

    But the same happens with a jQuery object, etc.

    Uncaught TypeError: Cannot read property 'parent' of undefined
        at b.featherlight.afterContent (https://example.com/wp-content/plugins/wp-featherlight/js/wpFeatherlight.pkgd.min.js?ver=1.1.0:1:13224)
        at d (https://example.com/wp-includes/js/jquery/jquery.js?ver=1.12.4:2:3856)
        at b.afterContent (https://example.com/wp-content/plugins/wp-featherlight/js/wpFeatherlight.pkgd.min.js?ver=1.1.0:1:9393)
        at b.d [as afterContent] (https://example.com/wp-includes/js/jquery/jquery.js?ver=1.12.4:2:3856)
        at Object.<anonymous> (https://example.com/wp-content/plugins/wp-featherlight/js/wpFeatherlight.pkgd.min.js?ver=1.1.0:1:4865)
        at i (https://example.com/wp-includes/js/jquery/jquery.js?ver=1.12.4:2:27449)
        at Object.fireWith [as resolveWith] (https://example.com/wp-includes/js/jquery/jquery.js?ver=1.12.4:2:28213)
        at Object.e.(anonymous function) [as resolve] (https://example.com/wp-includes/js/jquery/jquery.js?ver=1.12.4:2:29192)
        at HTMLImageElement.e.onload (https://example.com/wp-content/plugins/wp-featherlight/js/wpFeatherlight.pkgd.min.js?ver=1.1.0:1:6090)
Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Robert Neu

    (@fatmedia)

    G Money Debtor

    Sorry you’re having trouble, but this is a bit beyond the scope of support for this plugin. It’s difficult to say exactly what the issue is given the code you’ve provided, but make sure you’re loading your custom JS after WP Featherlight has been fully loaded.

    For more help with getting your code to run, check out the Featherlight topic on StackOverflow.

    Looks like it just needed a target… so the initial code was changed to include a target…

    jQuery(".specialbutton").featherlight("/wp-content/uploads/3.jpg");

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Console Uncaught TypeError’ is closed to new replies.