> I would note some problems (2): > > If we have > > $(xml).find("foo").attr("height", "180cm") > > then you would expect calling elem.setAttribute() and not .height(), I > hope. > If so, there is a bug in jQuery.attr()...
So we could disable it on XML documents - but regardless, that is definitely th exception. > > Other think to take in consideration is that > > $("div").attr("click", function(){ /*..*/ }); > > is not equivalent to > > $("div").attr({ > click: function(){ /*..*/ } > }); > > Infact in the first case we are setting "click" attributes with the > result of the function, while in the second case we are binding click > event, in theory (second case is still not ready?). > Not consistently at all. Naturally, they aren't the case - the second is far superior. Setting a DOM 0 expando property is simply so substitute for binding events via jQuery. > Also there is a jQuery.attrFn.bind. Why? > > Am I missing something? Because bind can take an object that can set multiple events simultaneously. .bind({ click: fn, mouseover: fn2 }) --John -- You received this message because you are subscribed to the Google Groups "jQuery Development" group. To post to this group, send email to jquery-...@googlegroups.com. To unsubscribe from this group, send email to jquery-dev+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/jquery-dev?hl=en.