Can I pass a variable to hover ()?
As in the script below, I do not want to declare the same variable twice var target = xxx , and I do not want this variable to be global target = xxx bcos. I have another function using this variable name - the target.
$('.image-profile').hover(function () { var target = $('.button-change-image-profile',this); target.show(); },function () {
So, I tried to pass var like this },function (target) { course, this is wrong, but any other way to pass this var?
thanks.
variables scope jquery global-variables hover
laukok
source share