Adding an additional click event to every element (JavaScript / jQuery)
        Posted  
        
            by Gausie
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by Gausie
        
        
        
        Published on 2010-03-18T14:27:32Z
        Indexed on 
            2010/03/20
            21:21 UTC
        
        
        Read the original article
        Hit count: 237
        
I'm developing a touchscreen application that, aside from everything else, records the amount of times the screen is used so that the user can be reminded to clean the screen after a predefined number of clicks.
I've got the click functions written nicely, all I need now is make sure the function is called on a click.
I imagine $('*').click(function() { //do something }); would accomplish my goal, but is that the best way? Also, would that overwrite other click functions assigned to the elements?
© Stack Overflow or respective owner