This is quite simple but I being not very efficient with jQuery finding it hard to make it work....
I want a notification popup to be displayed (Just as facebook) which tells the user that he have earned some points.
I am using WordPress and the code for popup is working fine, which is below.
jQuery.noticeAdd({
text: " Congratulations! You Have Just Earned 5 More Points",
stay: false
});
However i want the popup to be displayed once an specific button is clicked. the Class for the button is comment-reply-link.
So i wrote this code
$(".comment-reply-link").click(function() {
jQuery.noticeAdd({
text: " Congratulations! You Have Just Earned 5 More Points",
stay: false
});
});
But this code doesn't works.. Did I made any mistake?? How can i make the notification popup to appear only when the button with the particular class is clicked.