Hi,

Although this came up in the context of developing a plugin, I think
it's a more general issue. So I'm posting it on this list.

I am developing a plugin to be called from a web page. The call looks
like:

              $(window).resize(function() {
                                $(window).myPlugin();
                                });

Then in the plugin, I have a standard "return this.each, followed by
three alerts:

             var key;
             var value;
             return this.each(function(key,value)
                        {
                                alert('In the loop');
                                alert('Key = ' + key);
                                alert('Value= ' + value);

Now the funny thing is that in Firefox 3.5.1 the third alert returns
"Value= [object Window]" whereas it returns "Value=[object]" in MSIE
6.0.

I thought jQuery is setting the value, so I don't understand why the
browsers differ in their behavior. Is this normal? Is there a reason
for this difference other than Micro$oft's non-standard ways? What's
the best way to deal with the problem, since I want to distinguish
between resizing a window and other resizes.

Thanks.

Reply via email to