Script not working after navigation
Hello,
I passed the last days reading through the internet to find a solution... Maybe someone here can help me.
The problem: Javascript works only on the first access to the page. If you navigate to another page and then back to the initial first page, the scripts are not working anymore. (Nothing happens)
Page A is the page with the scripts.
1. Direct access to page A -->> Script works
2. Change (click link) to page B
3. Go back to page A (click link)
4. -->> Script is not working anymore
If the first page I access is NOT the page with the scripts, everything work well also after page changes.
1. Direct access to page B
2. Change (click link) to page A -->> Script works
3. Go back to page B (click link)
4. Go back to page A (click link)
5. -->> Script still works!!
What could be the problem?
The scripts on page A are in
[HTML]<div data-role="page" class="pages" data-theme="a" id="today">
<script>
$(document).on("pagebeforeshow", "#today", function(){
$(document).on("click",".open_abwesend",function(e) {
...[/HTML]
Do someone have a solution for this strange behaviour?
Thanks!
Léo