Recently we have a wordpress project with jQuery Mobile is the core framework to build the client theme. I meet the problem with popup with content change, so in the first popup show we only have the limited content text but then the content need to show ‘s much more than the first show, and the layout become too bad.
But if we resize the windows, the popup display well again, that ‘s why I show you here to get the solution to make the popup show beautiful even though user don’t resize the windows. Here is the tips:
1 | $("#your-popup").trigger('updatelayout'); |
And to make sure you call this line
1 | $(document).resize(); |
Then everything should work well again :).
You save my day to solve the crazy mobile screen, thanks man.
It must save me at least 2 days working. Thanks man.
It doesn’t work for me here. What wrong with it? It doesn’t change anything???