JQuery mobile tool-tip popup("close") function is not working in IPhone 5

html, iphone, jquery, jquery-mobile

Solution

Got it. Add `data-history="false"` to the `popupBasic` Popup div.

<!-- Button / works without it -->
<a href="#popupBasic" data-rel="popup">Open Popup</a>

<!-- Popup #popupBasic -->
<div data-role="popup" id="popupBasic" data-history="false">
<p>This is a completely basic popup.<p>
</div>

JS:

<script type="text/javascript">

 $(document).live( 'pagechange',function(){
 $('#popupBasic').popup("open")
  setTimeout(function() {
  $('#popupBasic').popup("close");
  }, 5000);
 });

</script>

JSfiddle: Popup

Problem

In my JQuery Mobile site I've added a tool-tip dialog box to open when the page is load and It'll disappear after 5sec. My code is similar to follows, ``` <div data-role="popup" id="popupInfo"> <p>This is a completely basic popup, no options set.<p> </div> <script type="text/javascript"> $(document).live( 'pagechange',function(event){ $('#popupInfo').popup("open") setTimeout(function() { $('#popupInfo').popup("close"); }, 5000); }); </script> ``` This update is working fine in all devices except in IPhone 5 iOS 6. Because when I tried to load my JQuery mobile page with above script in IPhone 5 iOS 6 device it redirect me to the previous page when the popup closing. I'm not sure what I've missed here but for me it looks like jQuery Mobile popup("close") function is not supporting for IPhone 5 iOS 6. Also when the tool-tip load following hash tag text appending to the URL how can we avoid this `#&ui-state=dialog` Could anyone please let me know how can we solve this issue ? I've even tried following code also; ``` $(document).on('pagechange',function(event){ $('#popupInfo').popup("open").delay(2000).popup("close"); }); ``` But this is not working at all

Original source