nk-crew / awb

Advanced WordPress Backgrounds with Gutenberg support. Images, Videos and Parallax

Home Page:https://wpbackgrounds.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

nkAwbInit() is called before the page is completely ready

Gandhi11 opened this issue · comments

Hi, I am trying to use your plugin at the same time as vuetify and it look like when I have both activated your plugin is not working. After some time debugging, this is what I found.

  • window.nkAwbInit() seems properly called
  • The div.nk-awb-inner seems to be exist but not selectable by jQuery (Node cannot be found in the current page.)

It look like there something going in vuetify at the same time.

To solve the problem I only had to wrap all the window.nkAwbInit() inside a document.ready and everything seems to work.

Something like

$(document).ready(function() {
    window.nkAwbInit();
});

Is there any way you could have a look into the problem?

Thanks

Hey.

As you can see in the source code, we are using the MutationObserver with a 200ms throttle. We don't need the ready event at all. If you can provide an example of this problem, which I can reproduce locally, we can try to resolve it.

Regards, nK.