I'm using the new popup dialog in jquery mobile 1.2.0 to display a bunch of youtube videos. Here are the popup examples I'm using:
http://jquerymobile.com/demos/1.2.0/docs/pages/popup/popup-iframes.html
Notice the maps example... it's a fancybox style with a close button. I've made my video popup do the same thing. The difference is the additional close link, added to the popup like so:
<a href="##" data-rel="back" data-role="button" data-theme="a" data-icon="delete" data-iconpos="notext" class="ui-btn-right">Close</a>
Here's the problem: After opening one video and then closing it, then opening the next video and closing it, the first video shows up again. I think it's because the previous video is where "back" is in the history, and the close box is implemented as "back".
Is there a built in way to implement the close box as a true "close", or would I need to do it via javascript?
@Redtopia, thanks for the response. I fixed my issue by setting the myPopup.popup({ history: false });
option on the popup. Then everything works fine.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With