Jquery Mobile, document ready not fire.

Today i have experience some weird situation which i already put the alert script on my mobile html page, but the alert didn't show. The alert script not put at the homepage, but at the url provided, when click the button then will redirect current page to the new page with contain alert script.

For me,this is so weird.

No error on script.

At the first place i though it was cache.. so i click on refresh button.. So i just assume it is cache. But after a while, it always need to refresh only show the alert message. So i start googling the problem.

Some folks says need to clear  cache, close open the browser, and put some funny funny script just to clear the cache.. But still the problem exist.

After keep looking, i found the answer in here : Demo JQuery

The document say, if want to put html "a" tag, need to put some attribute based on what are the requirement you want.

Example :

if you want to redirect the current page to the new page :
<a href="newpage.html">click here</a>

You need to supply another attribute to force the page to reload / refresh like this :

<a href="newpage.html" rel="external">click here</a>

Lol, this was funny for me. Because i have spend like 1 hour to find the solution. 

Hope this simple story will help someone.

= D

By
NOTE : – If You have Found this post Helpful, I will appreciate if you can Share it on Facebook, Twitter and Other Social Media Sites. Thanks =)

Popular posts from this blog

How to create zip file to download in JSP- Servlet

How to create DataGrid or GridView in JSP - Servlet

Pinging in ASP.NET Example