Problem with variable and function in .each
- (function($) {
$.fn.pluginname = function(settings) {
return this.each(function() {
var width = parseInt( $(this).css('width') );
$(this).bind('mouseleave', function() {
gofunc();
});
gofunc = function() {
alert(width); // How do I get the variable "width"?
}
});
};
})(jQuery);
Hi, i'm new to jQuery and... oh... sorry for my english. I'm trying to get the variable "width" of ".each", but ".each" is overwriting "width" with the last "width" of the elements. I do not want to have this as parameter or to get the width again directly from the element. Is there a way?
Thank you, dipser