dieulot/instantclick-website

Adding "data-no-instant" with jQuery?

Closed this issue · 2 comments

I have a situation where I cannot easily add data-no-instant directly to the markup and instead need to add it with Javascript.

If I wrap the InstantClick.init(); in a document ready jquery function, then when I add the attributes to the elements on page load it works OK. However, once I navigate away from the page to another page and then back to the original page (homepage in this case). The data-no-instant is still present on the elements- but they no longer work and InstantClick still tries to preload the page.

Also, why is it setup so that data-no-instant isn't a proper attribute? The plugin should look for data-no-instant=true or data-no-instant=data-no-instant.

Agreed, I just posted this issue here dieulot/instantclick#100

Also you're posting issues in the wrong repo I think

Yep, wrong repo. I’ll have a look at dieulot/instantclick#100.

I’ve renamed this repo to avoid future confusions (previously named instantclick.io).