glenelkins Posted July 30, 2009 Share Posted July 30, 2009 hi is there a way to detect when ANY element on the page is clicked rather than just a specific one so i can run a global resetting function thanks Quote Link to comment https://forums.phpfreaks.com/topic/168117-jquery-question/ Share on other sites More sharing options...
RichardRotterdam Posted July 30, 2009 Share Posted July 30, 2009 If you have firebug you can see what gets clicked in the console tab <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.3/jquery.min.js"></script> <script type="text/javascript"> $(document).ready(function(){ $('html body *').click(function(){ console.log($(this)); }); }); </script> Quote Link to comment https://forums.phpfreaks.com/topic/168117-jquery-question/#findComment-886667 Share on other sites More sharing options...
glenelkins Posted July 30, 2009 Author Share Posted July 30, 2009 so basically you mean $('html body *') will detect any element? Quote Link to comment https://forums.phpfreaks.com/topic/168117-jquery-question/#findComment-886685 Share on other sites More sharing options...
RichardRotterdam Posted July 30, 2009 Share Posted July 30, 2009 any html element inside the body tag yes Quote Link to comment https://forums.phpfreaks.com/topic/168117-jquery-question/#findComment-886712 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.