Pedro Pedro - 1 year ago 88
jQuery Question

mouseover with fadein effect

Im applying a fade in when a user mouseover a element, but is not working, here is my code line:

$(this.svgElement).on('mouseover', '.' + jsTagClass, $.proxy(this.onTagClick, this)).fadeIn(2000);

Answer Source

Use the fadeIn in the callback function of your mouseover event listener like this:

$(this.svgElement).on('mouseover', '.' + jsTagClass, function() {

If the given variables have the right values, this will work.