Hi I would like to describe a script that I would like to execute, and I have no idea how
I would like to bind \ live on an element to a custom 'myclick':
$('#somediv').bind('myclick', function() {});
obviously, I would like to trigger this event only when something happens to this element, for example if myclick happened on this element
I know how to fire a custom event for a specific item ( http://api.jquery.com/category/events/event-object/ )
Clarifications to the question:
I will determine what myclick means (for example, 3 consecutive clicks in this element)
how can I tell when this happened on "somediv"?
Am I somehow registering through jquery elements that bind \ live to them? if so, how?
full example:
<html>
<head>
<script to include jquery>
<script to include MYCODE.js>
<script>
$('#somediv').bind('myclick', function() { alert('myclick'); } );
</script>
<body>
<div id='somediv'></div>
</body>
<head>
</html>
so my question is: what does MYCODE.js contain?
how can he say that some kind of user logic that he defines happened on "somediv"?
thanks for the help
Nadav source
share