Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

jQuery click function not working?

//Why is this jQuery click function not working?
//You are supposed to add the javascript code in a $(document).ready(function() {});

$(document).ready(function() {
  $("#clicker").click(function () {
    alert("Hello!");
    $(".hide_div").hide();
  });
});
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #jQuery #click #function
ADD COMMENT
Topic
Name
2+2 =