tap event causing page load when returning false from function
Hi,
I have an unordered list like so:
<ul class="std">
<li><a href="pathtolargerimage"><img src="pathtosmallerimage" /></a></li>
<li><a href="pathtolargerimage"><img src="pathtosmallerimage" /></a></li>
</ul>
I am using the tap event to display the larger image in a placement holder on the page
The problem is that very often, I am receiving "page loading" which is not the expected
or desired outcome of this code... have tried using $.mobile.pageLoading( true )
to suppress loading, but to no avail.
Any help much appreciated!
$("ul.std a").bind("tap",function() {
$.mobile.pageLoading( true );
var largeImgSrc = $(this).attr("href");
$("#portfolioDetail img").attr("src",largeImgSrc);
$("#contentReplacement").hide();
$("#portfolioDetail").hide().fadeIn("slow",function(){
$(document).scrollTo(0,200);
});
return false;
});