jQuery Mobile - Do something on page load

Viewed 33699

I want to do something every time a page loads. It's something that fixes the way the mobile site looks on different devices so it needs to happen on AJAX loads too.

At the moment, I've tried the traditional $(function(){ /*...*/ }); approach but that only works on the first load, and not subsequent AJAX loads.

I've been looking for the right event to bind to but I'm failing pretty hard.

2 Answers
Related