Arbitrary parameter jQuery.on
by Luiz Silva
HTML
<div>Clique</div>
JavaScript
$(function(){
function teste(param) {
console.log(param.data.teste);
}
$('div').on('click', {teste: 'teste'}, teste);
});
by Luiz Silva
<div>Clique</div>
$(function(){
function teste(param) {
console.log(param.data.teste);
}
$('div').on('click', {teste: 'teste'}, teste);
});