My code:
function myFunc(callback) { /*do stuff*/
$('div').one('mouseover', function () {
alert('mouseover');
callback;
});
}
$("div").click(function () {
alert('clicked');
myFunc(function () {
alert('Callback');
});
});
However, callback
does not execute, nor is there an error in the console. How can I make this work?
Fiddle: http://jsfiddle.net/8Z66u/