0

How can I write the following jquery in prototypejs?

<a class="button view" style="cursor:pointer" id="addComment"></a>

$(function() {
 $("#addComment").click(function(){

         alert("hello world");
     });
});

1 Answer 1

1

Working demo

Event.observe('addComment', 'click', function(event) {
    alert('u clicked on click here');
});​
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.