Reputation: 11
can anybody see where im going wrong here? Im trying to make a simple alert function when a button is clicked.
Okay so its working in jsFiddle but not on my website that HAS jQuery running :S
I have the following php...
if($interest1 != ''){
print $interest1 . "<a href='javascript:void(0);' class='deleteinterest'>delete</a><br />";
}
and in my AJAX.JS I have the following...
// Delete Interest Function
$(".deleteinterest").click(function()
{
alert('hello');
});
// End Delete Interest Function
Only this doesnt work?
Upvotes: 0
Views: 599
Reputation: 11175
You have mootools selected, try using jquery selection in the jsfiddle menu.
Fixed it for you: http://jsfiddle.net/jG9SQ/1/
Upvotes: 8