I am trying to pass the variables to callback function in Jquery
I have:
var test;
$('.img').hover(function(){
test='this is test';
}, function (){
//how do I pass the test value to the callback function..??
console.log(test)
})
Thanks for the help.
You don’t need to pass it, you could access
testin the second callback function.