Skip to content

Instantly share code, notes, and snippets.

@kyo-ago
Created September 8, 2010 02:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kyo-ago/569543 to your computer and use it in GitHub Desktop.
Save kyo-ago/569543 to your computer and use it in GitHub Desktop.
click_wrapper
$().ajaxSend(function () {
if ($('#click_wrapper').length) return;
$('<div id="click_wrapper">').appendTo('body').css('opacity', 0);
}).bind('ajaxComplete', function () {
setTimeout(function () {
$('#click_wrapper').remove();
}, 500);
});
$('body').live('pageAnimationStart', function () {
if ($('#click_wrapper').length) return;
$('<div id="click_wrapper">').appendTo('body').css('opacity', 0);
}).live('pageAnimationEnd', function () {
$('#click_wrapper').remove();
});
$('a').live('tap', function () {
$('a').not(this).removeClass('active');
});
/* for css
#click_wrapper {
width:100%;
height:100%;
position:absolute;
top:0;
left:0;
z-index:9999;
display:block;
}
*/
@kyo-ago
Copy link
Author

kyo-ago commented Sep 8, 2010

/* for jQTouch */

click_wrapper {

width:100%;
height:100%;
position:absolute;
top:0;
left:0;
z-index:9999;
display:block;

}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment