[jquery-dev] Using a single 'var' statement per scope

2009-11-30 Thread lrbabe
I'm wondering if there are some arguments against following this rule. There are many places in the code where it is ignored. I've also seen a trick to save another few bites where indexOf is involved by using the ~ operator: replacing tests such as if ( str.indexOf(".") >= 0 ) by if ( !~str.index

[jquery-dev] Re: suggestion: $.support.expression & $.support.borderRadius...

2009-11-13 Thread lrbabe
I don't think it's a good idea because not all developers use border- radius or expressions. It could make a valuable plugin (if not already existing), though. On Nov 14, 12:28 am, Daniel Friesen wrote: > Don't forget -khtml, WebKit also supports it, but I recall reports that > some versions of K

[jquery-dev] Re: Why use jQuery.isObject in jQuery.extend

2009-11-10 Thread lrbabe
By the way, if we use the code of isObjectLiteral only once, it doesn't have to be a function either. The less function call, the better. On Nov 10, 11:19 pm, lrbabe wrote: > It doesn't seem to be in 1.3.2 > There isn't probably much code relying on it out there, since

[jquery-dev] Re: Why use jQuery.isObject in jQuery.extend

2009-11-10 Thread lrbabe
it is labelled "too trivial" to be part of jQuery ? > > --DBJ > > On 10 Nov, 20:45, lrbabe wrote: > > > I agree that the current isObject has to be renamed to avoid > > confusion. > > But we don't need any isObject using Object.prototype.toString.call &

[jquery-dev] Re: Why use jQuery.isObject in jQuery.extend

2009-11-10 Thread lrbabe
I agree that the current isObject has to be renamed to avoid confusion. But we don't need any isObject using Object.prototype.toString.call anywhere in the code... This could be included in any plugin, where required. On Nov 10, 9:28 pm, DBJDBJ wrote: > All is ok then ? > > We/You/me just need ,

[jquery-dev] Re: Why use jQuery.isObject in jQuery.extend

2009-11-08 Thread lrbabe
idn't get a chance to finish > > it up. Yehuda, any thoughts? > > > --John > > > On Sat, Nov 7, 2009 at 12:05 AM, lrbabe wrote: > > > In the current implementation of jQuery.extend we can find the > > > following code: > > > > // Re

[jquery-dev] Re: watching 1.4 progress

2009-11-07 Thread lrbabe
Great news! On Nov 7, 6:43 am, John Resig wrote: > Thanks for the kind words, Chris, I appreciate it! I'm slowly getting > more organized (figuring out where we stand and what bugs we're > missing) - I hope to push out a really solid release. > > I almost have the new bug tracking system set up (

[jquery-dev] Re: Making fadeIn and fadeOut more useful

2009-09-22 Thread lrbabe
I'm often running into the same issue, trying to play with the optional parameters of .stop(), with varying success. On Sep 22, 11:47 pm, Jörn Zaefferer wrote: > fadeIn() and fadeOut() cool be much more useful if they'd work > together instead of queueing up against each other. A usecase where >

[jquery-dev] Re: What about event delegation for change, submit, reset and select?

2009-09-21 Thread lrbabe
Sorry, I should have mentioned that they are already being used _in nightly builds_, exactly in the way you describe. If this solution is to be chosen, I agree that this fact should be documented. The alternative implementation for bubbling submit/change/select relies on click and keypress, for wh

[jquery-dev] Re: What about event delegation for change, submit, reset and select?

2009-09-21 Thread lrbabe
focusin and focusout events are proprietary Microsoft events, it is unlikely that anybody will use them in a modern Web page. Our bubbling focus and blur are already relying on them. On Sep 21, 1:57 am, Már wrote: > It's late at night here, so this might be an embarrassingly stupid > question...

[jquery-dev] Re: What about event delegation for change, submit, reset and select?

2009-09-20 Thread lrbabe
ck overflow" errors : ( I'm wondering if it's my installation of IE8 which is buggy or if the problem is more serious... The draft of the patch is available as a gist: http://gist.github.com/189976 and I've also built a small test page: http://gist.github.com/189977 If som

[jquery-dev] Re: What about event delegation for change, submit, reset and select?

2009-09-20 Thread lrbabe
is lame - either way I think > we may be able to make use of this technique. > > --John > > On Sun, Sep 20, 2009 at 11:26 AM, lrbabe wrote: > > > The principle of Reglib is to always work for existing and future > > elements. > > Those events rely on a bubbl

[jquery-dev] Re: What about event delegation for change, submit, reset and select?

2009-09-20 Thread lrbabe
the live method? In that you > can bind an event to any element that currently exists and will exist? This > is really a non-solution, unfortunately. > > --John > > On Sun, Sep 20, 2009 at 9:43 AM, lrbabe wrote: > > > Hello everybody, > > > I know that before releasi

[jquery-dev] Re: What about event delegation for change, submit, reset and select?

2009-09-20 Thread lrbabe
I forgot to add a link to the related blog post: http://blogs.sun.com/greimer/entry/event_delegation_for_submit_change On Sep 20, 3:43 pm, lrbabe wrote: > Hello everybody, > > I know that before releasing jQuery 1.4 it is expected that all events > should be compatible with .live

[jquery-dev] What about event delegation for change, submit, reset and select?

2009-09-20 Thread lrbabe
Hello everybody, I know that before releasing jQuery 1.4 it is expected that all events should be compatible with .live() I had a look at the patch related to submit, proposed by Justin Meyer: http://dev.jquery.com/ticket/5267 and I am afraid by the possibility that all of these events could requ

[jquery-dev] Re: Test Swarm . Next

2009-09-19 Thread lrbabe
rting point. On Sep 20, 12:34 am, Andrea Giammarchi wrote: > Brainstorming finished then (LOL) > > On Sat, Sep 19, 2009 at 11:24 PM, lrbabe wrote: > > > What about asking the constructors to give away mobile phones for a > > testing purpose? > > Phones that would be conne

[jquery-dev] Re: Test Swarm . Next

2009-09-19 Thread lrbabe
What about asking the constructors to give away mobile phones for a testing purpose? Phones that would be connected all day long to test swarm and plugged on power. I'm pretty sure Nokia would agree, and the others might follow. Regards. On Sep 19, 11:57 pm, Andrea Giammarchi wrote: > Hi there,

[jquery-dev] Re: detecting jQuery objects && "constructor" property

2009-09-17 Thread lrbabe
mmmh... overwriting the constructor property doesn't sound like a great idea to me. What about all the code that has been written by developers expecting the constructor to be what it is supposed to be: Object You could use other particular properties of any jQuery object: they are not arrays but

[jquery-dev] Proposition for live with mouseenter and mouseleave

2009-09-16 Thread lrbabe
issed. Regards, lrbabe --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "jQuery Development" group. To post to this group, send email to jquery-dev@googlegroups.com To unsubscribe from this group, send emai

[jquery-dev] Re: jquery color bug in my swoop clone script

2009-09-09 Thread lrbabe
Hello Sherydeveloper, This is the group for questions related to the development of the library itself rather than how to use it. You have more chances to get an answer if you post on the appropriate group: http://groups.google.com/group/jquery-en Adding some details about your issue would also h

[jquery-dev] Re: Ticket #4917

2009-09-09 Thread lrbabe
Great : ) On Sep 9, 6:06 am, gopi nath wrote: > hi > i have done now it is working fine please find the attachment > > On Wed, Sep 9, 2009 at 5:04 AM, lrbabe wrote: > > > Hey Jeffrey, > > > just out of interest, can you try to apply this patch: > >http://

[jquery-dev] Re: Ticket #4917

2009-09-08 Thread lrbabe
Hey Jeffrey, just out of interest, can you try to apply this patch: http://dev.jquery.com/raw-attachment/ticket/5076/patch.txt to your version of jQuery. It's has a new implementation of jQuery.filter that _might_ yield a different result for the children function. Regards, Louis-Rémi On Sep 8

[jquery-dev] Re: The Context property/parameter

2009-09-06 Thread lrbabe
I filed a bug and submitted the corresponding patch: http://dev.jquery.com/ticket/5172 comments are welcome. On Sep 6, 11:30 pm, lrbabe wrote: > Unfortunately it doesn't work like that in the latest nightly. > What is causing the most confusion is that the three following queri

[jquery-dev] Re: The Context property/parameter

2009-09-06 Thread lrbabe
Unfortunately it doesn't work like that in the latest nightly. What is causing the most confusion is that the three following queries do not produce the same context: $("div", document.getElementById("myId")); $("div", $("#myId")); $("div", "#myId"); Actually, only the first one result in the el

[jquery-dev] Re: jQuery.inArray Easy Improvement

2009-09-03 Thread lrbabe
Or a single line change: inArray: function( elem, array ) { if(array.indexOf) return array.indexOf(elem); for ( var i = 0, length = array.length; i < length; i++ ) { if ( array[ i ] === elem ) { return i; } } return -1; }, The availability of indexOf

[jquery-dev] Re: jQuery Dynamic Composition

2009-09-03 Thread lrbabe
Nice Andrea. In such case it would be valuable to have jQuery on Git or another DVCS. I could simply pull from you instead of re-creating the patch for myself, since I use inArray quite a lot in my project and don't want to wait for this improvement to be committed to the trunk. Sizzle is already

[jquery-dev] Re: What would you call jQuery's design patterns / principals?

2009-08-28 Thread lrbabe
Fri, Aug 28, 2009 at 1:30 PM, Andrea Giammarchi < > > andrea.giammar...@gmail.com> wrote: > > also is auto-reflective DOMOD approach sounds cool :D > > > On Fri, Aug 28, 2009 at 6:18 PM, lrbabe wrote: > > >> DOM Oriented Development sounds nice, looks like the "find thi

[jquery-dev] Re: What would you call jQuery's design patterns / principals?

2009-08-28 Thread lrbabe
DOM Oriented Development sounds nice, looks like the "find things, do stuff" alternative for research papers. On Aug 28, 3:17 pm, Nathan Bubna wrote: > DOM Oriented Development, all about nodes, data and events. > > On Thu, Aug 27, 2009 at 1:29 PM, Buddy wrote: > > > What would you call jQuery's

[jquery-dev] Re: syntax problems

2009-08-27 Thread lrbabe
due to the timing of   > it. For the first time in a long time I had a few minutes to reply on   > this and the jquery-en list (and I didn't see your reply before I   > posted mine). > > cheers! > > --Karl > > ____ > Karl Swedbergwww.englishrules.comwww.lea

[jquery-dev] Re: syntax problems

2009-08-27 Thread lrbabe
Next time I register on a Group I'm going to append Girl to my pseudo as well. Look, two detailed answers for one off topic question :D On Aug 27, 1:49 am, Karl Swedberg wrote: > Hi, > > if you can use jq('a...@id="myLink"]') then certainly you can use > jq('a#myLink') > > But to answer your que

[jquery-dev] Re: syntax problems

2009-08-26 Thread lrbabe
Hello HolicGirl, This is the group for questions related to the development of the library itself rather than how to use it. You have more chances to get an answer if you post on the appropriate group: http://groups.google.com/group/jquery-en While you're here, as indicated in the documentation

[jquery-dev] Re: $.getJSON problem with json parameter

2009-08-25 Thread lrbabe
Hello Rodrigo, This is the group for questions related to the development of the library itself rather than how to use it. You have more chances to get an answer if you post on the appropriate group: http://groups.google.com/group/jquery-en While you're here, according to the documentation of $.

[jquery-dev] Re: window resize

2009-08-25 Thread lrbabe
You're welcome. Being an abstraction library, I'm acually wondering if jQuery should handle that itself. Otherwise the resize event is not really useful... Regards, lrbabe On Aug 24, 10:38 pm, drupalwanderer wrote: > Oh thank you SO MUCH , and very sorry to have posted in the

[jquery-dev] Re: window resize

2009-08-24 Thread lrbabe
captured after the resize occured. The 100ms delay should be unnoticeable for your users and effective in most cases, but might be adjusted if required. Regards, lrbabe On Aug 24, 9:50 pm, hassafrass wrote: > Hi, > > I am trying to get the new width of a div after window resize.    I

[jquery-dev] making .filter() faster for common selectors improves performances of .filter(), .is(), .hasClass() and .closest()

2009-08-20 Thread lrbabe
ean 1.3.3 will be super fast? > > On Wed, Aug 19, 2009 at 14:06, lrbabe wrote: > > > I've created a ticket and submitted a patch, I was going to forget > > about it otherwise:http://dev.jquery.com/ticket/5076 > > > On Aug 18, 2:11 pm, lrbabe wrote: > &

[jquery-dev] Re: Multiple draggable into one div and cancel

2009-08-20 Thread lrbabe
Hello, This is the group for questions related to the development of the library itself rather than how to use it. You have more chances to get an answer if you post on the appropriate group: http://groups.google.com/group/jquery-en Regards, lrbabe On Aug 20, 2:58 pm, BuKKaKe wrote: >

[jquery-dev] Re: Add Cookie support

2009-08-20 Thread lrbabe
don't need ajax or fx. > I think this falls under the category of wanting a buildable jQuery > where you can disable things you don't need, and enable extra features > that you might want. > > ~Daniel Friesen (Dantman, Nadir-Seen-Fire) [http://daniel.friesen.name] > >

[jquery-dev] Re: Add Cookie support

2009-08-20 Thread lrbabe
Hello Miksh, Most of my projects do not make use of any cookies. It is just perfect as a plugin. On Aug 20, 3:07 pm, miksh wrote: > Hi all, > > Cookie is a common and widely used functionality so it is deserved to > be added into jQuery.Utilities rather than to be just a plug-in. > > Thanks > M

[jquery-dev] Re: Comment out NON IE code

2009-08-20 Thread lrbabe
Actually I could see different cases where this would be useful: the jQuery that are shipped with Mozilla labs Ubiquity and Jetpack extensions. They both allow to inject jQuery in a Web page, which is without any doubt displayed in a Firefox browser. On Aug 20, 2:32 pm, ludovic wrote: > Another

[jquery-dev] Re: Separation of browser-specific code

2009-08-20 Thread lrbabe
jQuery is doing something similar with its "support" object: http://docs.jquery.com/Utilities/jQuery.support It uses feature detection once at the script initialization and then uses boolean values to determine which code is appropriate.. On Aug 20, 7:50 am, ludovic wrote: > > It is a bad idea b

[jquery-dev] Re: Separation of browser-specific code

2009-08-19 Thread lrbabe
It is a bad idea because there is no such thing as foolproof browser sniffing. The only way to know what the browser can do is to test its features, and loading a piece of script for every feature implementation specific to a browser completely kills the benefit of loading less script. Beside, jQ

[jquery-dev] Re: making .closest() faster on common selectors to improve performance of event delegation.

2009-08-19 Thread lrbabe
I've created a ticket and submitted a patch, I was going to forget about it otherwise: http://dev.jquery.com/ticket/5076 On Aug 18, 2:11 pm, lrbabe wrote: > I re-wrote .filter() this morning:http://gist.github.com/169693 > Here are the new profiling outputs (I repeat the previo

[jquery-dev] Re: making .closest() faster on common selectors to improve performance of event delegation.

2009-08-18 Thread lrbabe
ng from a green span to a red span: calls = 43, time ~= 0.93ms As I expected, there is a benefit in using a cache, but there doesn't appear to be any benefit in using .data() for that purpose. Regards, Louis-Rémi On Aug 18, 2:02 am, lrbabe wrote: > I was also wondering what kind of s

[jquery-dev] Re: Help

2009-08-18 Thread lrbabe
A link to your website could be helpful On Aug 18, 7:39 am, Samer Ziadeh wrote: > could be positioning or floats of the element, if so try nesting the > elements. > > On Thu, Aug 13, 2009 at 15:51, Dizz845 wrote: > > > I'm a newbie to this so please be gentle. When browse my site on > > firefox

[jquery-dev] Re: making .closest() faster on common selectors to improve performance of event delegation.

2009-08-17 Thread lrbabe
s optimization with its current implementation, and I use .hasClass() a lot! On Aug 18, 1:00 am, lrbabe wrote: > It would definitely make sense of course. > > What I really wanted was to minimize the impact of this extra- > processing on complex selectors. > In .closest(), even if you

[jquery-dev] Re: making .closest() faster on common selectors to improve performance of event delegation.

2009-08-17 Thread lrbabe
o optimize the selectors in .live(). > Why not optimize .is()? or jQuery.filter? Optimizing jQuery.filter would > yield faster results for .filter(), .is(), and .live(). > > --John > > On Mon, Aug 17, 2009 at 1:38 PM, lrbabe wrote: > > > I've made some minor updates to

[jquery-dev] Re: making .closest() faster on common selectors to improve performance of event delegation.

2009-08-17 Thread lrbabe
o should I contact for that purpose? Regards, Louis-Rémi Babé On Aug 15, 2:23 am, lrbabe wrote: > Thank for your quick answer John, > > All right, I take the code of the example, remove the part that > updates the counter and wraps the rest with a console.profile() > >

[jquery-dev] Re: Firefox animation stutter

2009-08-15 Thread lrbabe
And using an absolute positioning on the elements to animate prevents a reflow (= important boost). On Aug 14, 11:29 pm, Joe wrote: > Is there anything that can be done about poor performance with some > animations in Firefox? I know it varies by machine, but with a core 2 > duo and 2 gigs of ra

[jquery-dev] Re: making .closest() faster on common selectors to improve performance of event delegation.

2009-08-14 Thread lrbabe
g 14, 2009 at 8:33 PM, lrbabe wrote: > > > Hi, > > > The principle of .closest( selector ) is that it cycles through the > > ancestors of an event target until it finds an element corresponding > > to the event target, or hits the root. > > To check for an elem

[jquery-dev] making .closest() faster on common selectors to improve performance of event delegation.

2009-08-14 Thread lrbabe
to cache the parsed selector). The code is available as a gist: http://gist.github.com/168158 and can be tested here: http://www.lrbabe.com/sdoms/closest/ Together with the recent addition of the "context" parameter in .closest(), it makes one of the most efficient event de

[jquery-dev] Re: Two questions about jQuery's inside

2009-08-14 Thread lrbabe
Thank you for those quick answers John! I'll file the ticket. On Aug 14, 2:23 pm, John Resig wrote: > > 1. The function hasClass is written this way: > > hasClass: function( selector ) { > >        return !!selector && this.is( "." + selector ); > > }, > > > Why not simply testing the className

[jquery-dev] Two questions about jQuery's inside

2009-08-14 Thread lrbabe
Hello everybody, I'm pretty confident with using jQuery but now I'd like to improve my understanding of the librarie's code itself. I sometime see an alternative way of writing portions of code but I'm pretty sure there is a good reason that it is the way it is... I would just like to understand.

[jquery-dev] Re: Ticket #4946, jQuery.isObject

2009-08-01 Thread lrbabe
I personally would just recommend not to use: return toString.call(obj) === "[object Object]" like in isArray or isFunction but instead: return Object.prototype.toString.call(obj) === "[object Object]" or something else, because I've already seen the former yielding results like "[xpconnect native

[jquery-dev] Re: Detecting IE8 operating in IE7 mode

2009-03-29 Thread lrbabe
Even though there is only few purely visual issues, there is some (such as the VML ones pointed above), and there is no point giving the developer indications about the browser and its version if a browser can run an alternate rendering engine... On Mar 29, 8:45 pm, Matt Kruse wrote: > On Mar 29

[jquery-dev] Re: Detecting IE8 operating in IE7 mode

2009-03-29 Thread lrbabe
tt Kruse wrote: > On Mar 4, 3:26 pm, lrbabe wrote: > > > I'm aware that jQuery promotes features detection over browser > > sniffing but currently we provide no way for the user to figure out > > easily when the browser is IE8 operating in the so called > > &quo

[jquery-dev] Detecting IE8 operating in IE7 mode

2009-03-04 Thread lrbabe
Hello everybody, I'm aware that jQuery promotes features detection over browser sniffing but currently we provide no way for the user to figure out easily when the browser is IE8 operating in the so called "compatibility mode". To detect that case the following line could be used: document.docum

[jquery-dev] Re: Regression jQuery UI 1.6rc4 + jQuery 1.3 : triggerHandler problems

2009-01-15 Thread lrbabe
Oh, great : ) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "jQuery Development" group. To post to this group, send email to jquery-dev@googlegroups.com To unsubscribe from this group, send email to jquery-dev+unsu

[jquery-dev] Regression jQuery UI 1.6rc4 + jQuery 1.3 : triggerHandler problems

2009-01-15 Thread lrbabe
I'm not very certain about the origin of this problem, but it appears that when using the last release candidate of jQuery-UI with the last official release of jQuery, triggerHandler causes some problem. Try to create a simple slider with a callback on "slide". Tell me if the callback is triggered