JQuery Haga clic en la función
$( "#target" ).click(function() {
alert( "Handler for .click() called." );
});
Confused Cobra
$( "#target" ).click(function() {
alert( "Handler for .click() called." );
});
$(document).on("click", ".onClass", function () {
//your code
var element = $(this); // to get clicked element
});
$("#button").click(function () {
//result show on console.
console.log("Button Was Click");
//console.log(this);
});
var myEl = document.getElementById('myelement');
myEl.addEventListener('click', function() {
alert('Hello world');
}, false);
myEl.addEventListener('click', function() {
alert('Hello world again!!!');
}, false);
// ==== A Tag Click ====
jQuery(document).ready(function () {
//id = #, class = .
jQuery('a-tag-class/id').click(function () {
alert("A Tag Click");
return false;
});
});