Have you attempted to apply an event handler in jQuery but it just isn’t firing? For example, the following:
1 |
$('.toggleBox h1').hover( function(){ alert("ok"); };) |
This will fail silently, the cause being the final semi-colon.
In this particular case you’re adding an anonymous function to the hover handler as a parameter, so you don’t specify a terminating semi-colon. But, for perfect form, you could move it to after the statement, as follows:
1 |
$('.toggleBox h1').hover( function(){ alert("ok"); }); |
Discover more from Gavin Orland
Subscribe to get the latest posts sent to your email.
Comment: