My issue concerns selecting elements inside
- Have regular site structure with view-main etc.
- Switch between pages inside view-main using router
- Each page ( class=“page” ) has invisible tag with an unique data-id. For example
<span class="myData" style="visibility: hidden" data-id="1234567" >
next one I switch to:
<span class="myData" style="visibility: hidden" data-id="7654321" >
- Try to select this tag by class(myData).
- The result is always the first page data id ie here: 1234567
- Check DOM inspector in a browser. The data id is: 7654321
- So basically selector’s DOM memory data doesnt get updated with the replaced page data.
I tried possibile solutions:
- Use id instead of class for myData: The same
- Use data-ignore-cache=“true”: The same
- Selecting in a more fancy way (.view-main > .page > .myData’).attr(‘data-id’): the same
It seems more like a Selector/JQuery contruction thing than F7 issue, but I cannot find any workaround to solve it.
Thanks in advance.