$( element ).click( function() {
});
How can I check if the element is clicked or not? I’m doing like that
function element() {
$( "#element" ).click( function() {
return 0;
} );
}
if( element() == 0 ) {
alert( "yes" );
} else {
alert( "no" );
}
But it’s not returning anything.
You could use
.data():and then check it with:
To get a better answer you need to provide more information.
Update:
Based on your comment, I understand you want something like: