| Description | iPhone | iPhone Retina | iPad | iPad Retina |
|---|---|---|---|---|
| Dimensions | 320 x 480 | 640 x 960 | 1024 x 768 | 2048 x 1532 |
| Status bar | 20 | 20 | 20 | 20 |
| App icon | 57 x 57 | 114 x 114 | 72 x 72 | 144 x 144 |
Thursday, 9 May 2013
iOS Devices Dimensions
Friday, 3 May 2013
Handling img click event on mobile devices
The following is the snippet for handling click event on mobile devices:
<script>
var touchflag = false;
$("img").bind("touchstart", function(event)
{
touchflag = false;
});
$("img").bind("touchmove", function(event)
{
touchflag = true;
});
$("img").bind("touchend", function(event)
{
if(touchflag) return;
name = $(this).parent().attr("id");
window.open("pageToOpen.html?q="+name,"_self");
});
</script>
<script>
var touchflag = false;
$("img").bind("touchstart", function(event)
{
touchflag = false;
});
$("img").bind("touchmove", function(event)
{
touchflag = true;
});
$("img").bind("touchend", function(event)
{
if(touchflag) return;
name = $(this).parent().attr("id");
window.open("pageToOpen.html?q="+name,"_self");
});
</script>
Labels:
Javascript,
Mobile Web
Subscribe to:
Posts (Atom)