ChrisM
ChrisM

Reputation: 11

jQuery alert not working

can anybody see where im going wrong here? Im trying to make a simple alert function when a button is clicked.

http://jsfiddle.net/jG9SQ/


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

Answers (1)

Phil
Phil

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

Related Questions