David,
Thank you so much for the suggestion. As you expected, it worked
perfectly for me. I ended up with the following:
function addHoverHide(linkClass, layerId) {
var t;
$(a. + linkClass).hover(function() {
clearTimeout(t);
// custom function which creates drop shadows
How about using closure like this?
function addHoverHide(linkClass, layerId) {
var t;
$(. + linkClass).hover(function() {
clearTimeout(t)
$(# + layerId).show();
}, function() {
t = setTimeout(function() {$(# + layerId).hide()}, 2000);
});
}
$(document).ready(function () {
2 matches
Mail list logo