Support » Plugin: TablePress » jQuery is not defined

  • Resolved cosmins

    (@cosmins)


    Hey guys,
    On our website we’re deferring/placing jQuery in footer for performance reasons and I’ve noticed this error shows up due to the generated dataTable inline JS.
    If I wrap this inline JS into a document.addEventListener('DOMContentLoaded') it works properly but we’ll be losing updates.

    What do you suggest? Is there a hook or any other way I can modify that inline JS to work properly if jQuery loads a bit later? Or any chance you can include this in a future release?

Viewing 1 replies (of 1 total)
  • Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    thanks for your post, and sorry for the trouble.

    No, sorry, I don’t plan to make immediate adjustments here. TablePress simply requires jQuery to be loaded, and it uses the WordPress script dependency system for that. If you deliberately break that, I can’t guarantee for things to work.

    You could maybe add your custom modifications via a TablePress plugin filter hook, to not lose them after updates.

    Regards,
    Tobias

Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.