i am trying to add a button in the autocomple.js when no match if found and it should allow the user to turn off autocomplete. i have added the button but i can not fire a event on the button click..
this is the code where i am trying to bind the mousedown event with the button
if (li.childNodes[x].tagName && li.childNodes[x].tagName == 'INPUT')
{
(li.childNodes[x]).mousedown(function() {
alert('finally');
});
}
thanks in advance ..
cheers….
abhi
This code in place of your snippet will do the trick:
Note that I added the
$on line 2 and bound to theclickevent instead ofmousedown.