Reputation: 127
I have a div
. There is an image in that div
. mousedown()
method is attached to that div. On the other hand .click()
method is attached to that image.
When I click on the image the .mousedown()
method start working. But I would like to stop that .mousedown()
and start .click()
method . How can I do that ??
Thanks
Upvotes: 1
Views: 3118
Reputation: 74420
This is what i understand you want to do:
$('img').mousedown(function(e){
e.preventDefault();
$(this).trigger('click');
});
Upvotes: 2