The $() you have at the moment just binds to the document. You
probably want $('*'), which selects all elements on the page.
Karl Rudd
On 2/1/07, Brice Burgess <[EMAIL PROTECTED]> wrote:
> I am trying to figure out how to block *all* activity on a page. When
> the page loads, I do not want clicked links to be followed, keypresses
> to be registered, etc. etc.
>
> Here is what I have tried;
>
> $().ready(function() {
> var h = function() { return false; };
>
> $().bind('keypress',h).bind('keydown',h).bind('mousedown',h).bind('click',h);
> });
>
> Which is virtually the same as blockUI, but I've included an additional
> bind type (click) and modified the "intercept function" (h) to plain
> return false.
>
> Unfortunately this doesn't seem to interrupt events. I've used *many*
> combinations of this technique to no avail -- trying different
> posistions, including event.preventDefault and event.stopPropagation,
> etc. etc.. and have not been able to figure out a means to stop all
> interactivity.
>
> Even on a vanilla page containing only jquery, a link, and the above
> code in <head>, clicking the link (<a href="...">link</a>) follows the
> target.
>
> Does anyone have any ideas?
>
> Thanks!
>
> ~ Brice
>
> _______________________________________________
> jQuery mailing list
> [email protected]
> http://jquery.com/discuss/
>
_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/