Top Picks

   
May 14, 2013

 

Jquery Mobile Popup not displaying as a button

 

using version 1.2.1

this is my code

<div data-role="page" id="page2"> <div data-role="header" data-theme="e"> <h3> Page 2 </h3> <a data-role="button" data-direction="reverse" data-rel="back" href="#page2" data-icon="arrow-l" data-iconpos="left"> Back </a> </div> <div data-role="content"> <a href="#popupBasic" data-rel="popup">Open Popup</a> <div data-role="popup" id="popupBasic"> <p>This is a completely basic popup, no options set. <p> </div> <div data-role="footer" data-position="fixed" data-theme="e"> <h4> footer </h4> </div> </div>

I have already included files that are necessary.

<link rel="stylesheet" href="css/jquery.mobile-1.2.1.min.css" /> <script src="http://code.jquery.com/jquery-1.7.1.min.js"></script> <script type="text/javascript" charset="utf-8" src="js/jquery.mobile-1.2.1.min.js"></script>

I am getting the “OPEN POPUP” as an hyper link where as it appears as a button in Jquery docs website

check this link

Jquery Example Link

 

Answer

You forgot to add

data-role=”button”

to your ‘a’ tag

demo

Professional Hosting fro Just Host

Filed under: Android Coding FAQ

Tags:

Comments

No Comments

Leave a reply