I’m using jQuery Mobile to create a site which will display an embedded YouTube clip on one of the pages.
My problem is that when the user tries to navigate to another page, the embedded object remains “over” the page whilst the transition plays. The result is that the video appears over the 2nd page for a split second and it doesn’t look good.
I’ve tried using .hide() on the video when a link is clicked and also tried creating a timeout but to no avail – can someone recommend a solution?
As it turns out I wasn’t capturing the correct event – I was checking for click when I needed to bind to a ‘tap’ event like so: