Skip to content
This repository has been archived by the owner on Jul 28, 2018. It is now read-only.

temporary inside permanent #674

Open
neohunter opened this issue Feb 24, 2017 · 0 comments
Open

temporary inside permanent #674

neohunter opened this issue Feb 24, 2017 · 0 comments

Comments

@neohunter
Copy link

Using turbolinks 3, current master.

I've this

<nav id="m" data-turbolinks-permanent>
   ...
   <span id="notifications_counter" data-turbolinks-temporary>3</span>
</nav>

But it does not seems to work, the span content keeps the same. I've tried to write a workaround for this using the differents events of pageload, for example:

addEventListener("page:change", function(newBody) {
   counter = $(newBody.data).find('#notification_counter').text();
...

But the counter is always the original loaded value, I guess because is inside on permanent, Is there a way to access the real html code that was loaded previous to the permanent modifications? Or this should work?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant