[jquery-dev] Re: $("[onclick^='fred']") vs $("[onClick^='fred']")

2008-10-05 Thread Mat Brennan
Hi John, I'll take your word for it. I was just thinking it might of been a quick solution as perhaps there are others out there doing the same. As for the reasoning behind it there wasn't really any; just a curious attempt while playing with the selectors. I do however apprecate your feedback

[jquery-dev] Re: Recursive comparsion of objects/arrays

2008-10-05 Thread weepy
I once wrote a recursive diff that would return the difference between 2 objects. I'll dig it out tomorrow. On 5 Oct, 21:35, "Jörn Zaefferer" <[EMAIL PROTECTED]> wrote: > Hi, > > it shouldn't be that hard, but I'm struggling implementing a recursive > comparsion of object structures in JavaScri

[jquery-dev] Re: jQuery.plugin()

2008-10-05 Thread Brandon Aaron
In a way it feels like we are trying to build just another class helper instead of just using prototypes. I understand we want to make it easy to build extendable and modular plugins/widgets. I think I see how the plugin builder can help us do that but I think it would be wise to get it working wit

[jquery-dev] Re: jQuery.plugin()

2008-10-05 Thread Yehuda Katz
As long as we could make this a standalone dependency without the entanglement of convincing new users to use "jQuery UI" as a dependency, I'd be cool with it. -- Yehuda On Sun, Oct 5, 2008 at 6:15 AM, John Resig <[EMAIL PROTECTED]> wrote: > > I agree with both Yehuda and Brandon. It would be use

[jquery-dev] Recursive comparsion of objects/arrays

2008-10-05 Thread Jörn Zaefferer
Hi, it shouldn't be that hard, but I'm struggling implementing a recursive comparsion of object structures in JavaScript. The goal is to have a function that returns true when two given arguments are equal, false if any single property isn't. I want to add that to QUnit - any help implementing it

[jquery-dev] Re: Unelegant Code

2008-10-05 Thread Jörn Zaefferer
A different name may help to better convey the meaning (maybe queue?) but otherwise I prefer this syntax a lot over the other proposals so far. Jörn On Sun, Oct 5, 2008 at 6:57 PM, John Resig <[EMAIL PROTECTED]> wrote: > > I want to add one more proposal to the pile: > http://dev.jquery.com/~john

[jquery-dev] Re: Unelegant Code

2008-10-05 Thread John Resig
I want to add one more proposal to the pile: http://dev.jquery.com/~john/plugins/chain/ A new .chain() method that allows you to write code like this: jQuery("div") .chain("hide", "slow") .addClass("done") .find("span") .addClass("done") .end() .chain("show", "slow

[jquery-dev] Re: Packaging format for jQuery plugins

2008-10-05 Thread Jörn Zaefferer
About the default file structure: jQuery UI currently has a theme folder, with a folder in there according to the name of the theme. Inside that are .css files and another folder, called images. All images referenced within the css files are inside that folder. So assuming that a plugin comes with

[jquery-dev] Re: Immunizing jQuery against enviroment changes

2008-10-05 Thread Ariel Flesler
console.log("raw time", +new Date - start); +new Date --> Yeah! > > start = +new Date; > for (var i = 0; i < 1000; i++) { >var tainted = Object.tainted(); >for (var key in test) { >if (!tainted || !Object.prototype[key]) { >fn(key, test[key

[jquery-dev] Re: Packaging format for jQuery plugins

2008-10-05 Thread Ca-Phun Ung
Exactly. Even on the rare occasion when someone uses a full url with http://it is pretty simple to just ignore those. On Sun, Oct 5, 2008 at 10:57 PM, Jörn Zaefferer < [EMAIL PROTECTED]> wrote: > That would simply assume that any URL within the CSS file is a > relative URL, which seems to be a sa

[jquery-dev] Re: jQuery.plugin()

2008-10-05 Thread Jörn Zaefferer
About the confusion/explaining thing: $.plugin would provide a documented API for creating non-trivial plugins. With a few examples, people would be able to use it without having to understand all the underlying abstractions. Eventually they need to learn them anyway, but so far basically everyone

[jquery-dev] Re: Packaging format for jQuery plugins

2008-10-05 Thread Jörn Zaefferer
That would simply assume that any URL within the CSS file is a relative URL, which seems to be a safe bet. Having absolute URLs in there doesn't make too much sense anyway, at least not in this context. Jörn On Sun, Oct 5, 2008 at 7:11 AM, Ca-Phun Ung <[EMAIL PROTECTED]> wrote: > Good stuff! One

[jquery-dev] Re: Unelegant Code

2008-10-05 Thread John Resig
I already did it: http://dev.jquery.com/~john/plugins/callback/ my other proposal: http://dev.jquery.com/~john/plugins/callback/old.html I'm working on a third proposal now. A nice thing about $.callback is that it's very simple (perhaps too simple - no support for chaining). --John On Sat,

[jquery-dev] Re: jQuery.plugin()

2008-10-05 Thread John Resig
I agree with both Yehuda and Brandon. It would be useful to a certain portion of plugin developers (it just so happens that there's a large overlap in the realm of jQuery UI). But the potential confusion that could be introduced would not serve us well. I'd like to propose something: We let the A

[jquery-dev] Re: Unelegant Code

2008-10-05 Thread Ariel Flesler
I agree. BTW, talking about currying... I made my curry() version some time ago, with a nice demo. If someone wants to check: http://demos.flesler.com/Curry/ Cheers -- Ariel Flesler http://flesler.blogspot.com On Oct 4, 11:56 am, Cloudream <[EMAIL PROTECTED]> wrote: > I do not like passing a j