How can I save html page with changes of jquery? -


i have html page, these codes:

<script>  $(document).ready(function(){   $("h4").click(function(){     $(this).html("read");   }); });  </script>   {% data in collecteddata %}     <div align="center" class="box">{{ data }}</div><h4>unread</h4> {% endfor %} 

for example click "unread" , became "read" when refresh page becomes "read" again. i'm sorry might silly question how can save jquery effects on html page ? edit:i 'm not working on server local, use jinja , have no database. use jinja , python.

you must store (persist) modified data somewhere. use ajax request server mark message read (as in case).

or can use localstorage/sessionstorage, known web storage, store data in browser. advised data can changed user sensitive information should not stored in web storage.

another new , exciting thing indexeddb, acts sql database on client-side.


Comments

Popular posts from this blog

css - Which browser returns the correct result for getBoundingClientRect of an SVG element? -

gcc - Calling fftR4() in c from assembly -

Function that returns a formatted array in VBA -