Paul's Programming Notes     Archive     Feed     Github

Jquery Mobile - Only Load Once

If you only want something to load once, you can use the "pageinit" event.

Here's an example of some code with "pageinit":

$(document).delegate("#yourPage", "pageinit", function(event) { alert( "ALERT!"); });


The code above would not run if you visited the page again.