Community Member Profile
- Profile: /members/4793-Jeremy-Martin.htm
- URL: http://blog.jeremymartin.name
- Comments: 10
- Points: 104
Recent Blog Comments By Jeremy Martin
-
Using Composed Javascript UI Controllers With Event Delegation
Posted on Oct 14, 2010 at 10:48 AM
This is sweet stuff! I've been following Rebecca Murphy's dialog on "enterprise jQuery" with a lot of interest. She raises a lot of good points, especially regarding jQuery's out-of-the-box suitability for complex UI's. It's awesome to see some examples of scalable code organization th... read more »
-
You Cannot Bind The Submit Event To Objects Using jQuery
Posted on Apr 5, 2010 at 11:25 AM
@Ben, Right - the main thing it buys you in this case is that anything jQuery needs for the binding is now available. You basically get to treat it just like the p element itself. You of course have to be careful about overriding stuff, and certain things that are set in the parag... read more »
-
You Cannot Bind The Submit Event To Objects Using jQuery
Posted on Apr 5, 2010 at 11:11 AM
@Ben, If you tell anyone I recommended this, I'll hunt you down - but this is somewhat interesting (in that it makes IE work): http://jsbin.com/ayufe3/2/edit In theory, this should allow for most any jQuery operation to work... read more »
-
You Cannot Bind The Submit Event To Objects Using jQuery
Posted on Apr 5, 2010 at 10:55 AM
... although by keeping it DOM-centric, it really just avoids the entire point of this post :)... read more »
-
You Cannot Bind The Submit Event To Objects Using jQuery
Posted on Apr 5, 2010 at 10:53 AM
Ya - for some reason I thought you were binding/triggering against "self.target", not "self". Not sure whether or not this snippet really makes any sense, but you do something similar to this example by keeping all the event logic DOM-centric: read more »
-
You Cannot Bind The Submit Event To Objects Using jQuery
Posted on Apr 5, 2010 at 10:22 AM
Awesome - I hunted down the ticket url in case anyone else is interested: http://dev.jquery.com/ticket/6398... read more »
-
You Cannot Bind The Submit Event To Objects Using jQuery
Posted on Apr 5, 2010 at 9:54 AM
Interesting find - I'm inclined to call that a bug as well. Did you submit a support ticket yet? Regarding the reasoning behind delegated submit events, I think I would defend it for two main reasons: 1) It maintains consistency with the rest of the events API. 2) There are some scena... read more »
-
Using Logical Operators To Perform Ternary Operations In Javascript
Posted on Nov 18, 2009 at 12:57 PM
OK - last one, but this is too hot not to share (worked in all my tests): exprTest && exprTestTrue|1 || exprTestFalse; bitwise ops FTW!... read more »
-
Using Logical Operators To Perform Ternary Operations In Javascript
Posted on Nov 18, 2009 at 12:19 PM
heh - you can take advantage of string truthiness and make it even shorter (and more unreadable) with this: exprTest && (exprTestTrue || ' ') || exprTestFalse;... read more »
-
Using Logical Operators To Perform Ternary Operations In Javascript
Posted on Nov 18, 2009 at 12:04 PM
With the ternary-ish trick, you can force the first branch to always return true (and therefore always skip the second) regardless of what the first branch's expression evaluates to: (exprTest && !(exprTestTrue && false)) || exprTestFalse; ternary equivalent: exprTest ? exprTestT... read more »



