Friday, 2 October 2015

Jquery Mobile, document ready not fire.

Leave a Comment
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 =)

0 comments:

Post a Comment

Subscribe to our newsletter to get the latest updates to your inbox.

Your email address is safe with us!




Founder of developersnote.com, love programming and help others people. Work as Software Developer. Graduated from UiTM and continue study in Software Engineering at UTMSpace. Follow him on Twitter , or Facebook or .



Powered by Blogger.