...

View Full Version : JavaScript fires on first event then stops working...



tbarbedo
03-22-2009, 12:10 AM
In the doc.ready I have the following...

$("a").click( function(e) {
alert('hey');
});

With a freshly loaded page, this works the first time you click on a link and then doesn't alert when you click another link.

Can someone tell me what I'm missing?

Thanks!

freedom_razor
03-22-2009, 08:01 PM
You've missed that (http://www.codingforums.com/showthread.php?t=82672).

Post your code, properly formatted with CODE tags. [if $ is a shortcut for getElementById, it is going to work only on one link]



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum