[jquery-dev] Re: possible event bug when binding to content added with html()?

2009-07-08 Thread Ricardo
You're binding the second event to the inner element - when you click it, the event bubbles up to #blk_1, so *both* handlers are triggered. Try this: http://pastebin.com/m44c1cffd Anyway, the way you're doing it doesn't make sense. You should just use live() for the inserted elements and return f

[jquery-dev] Re: Locale support in jquery

2009-07-08 Thread Ricardo
That was just to exemplify that formatting is not that hard a task. Last time I needed it, I used something like the line below to format the number correctly regardless of locale, removing all but the last separator: num.replace(/([^\d])(?=\d+[^\d])/g, ''); I'm not sure that will work for every

[jquery-dev] Re: Status of $.browser

2009-07-08 Thread Ralph Whitbeck
Conditional statements are great for IE problems but it doesn't help when you need to isolate a problem with Mozilla or Safari browsers. All I am suggesting is that the word "Deprecated" be swapped with something not so strong in meaning to something that conveys it's not the best practice to use

[jquery-dev] Re: Status of $.browser

2009-07-08 Thread George
One simple example might be in IE6 where you need to add a transparent iframe to stop elements from bleeding through html elements that are on top of them. I'm not aware of any way to detect this need by testing functionality. (Someone else on this thread has quite rightly suggested the use of c

[jquery-dev] Re: possible event bug when binding to content added with html()?

2009-07-08 Thread Dennis Jacobfeuerborn
live() version: http://pastebin.com/f5781ee8b The live() version works...as long as you don't introduce a second block. In this example "blk_1" and "blk_2" can be independently between STATE1 and STATE2 as long as you make sure that the last click switches a block to STATE1 before you modify the