If something is possible , that does not mean it is feasible ...

In the conext of jQuery, one can do a lot of kind-of-a "if then else"
logic through selectors and scope (aka context). Especially with the
help of plugins like :
http://plugins.jquery.com/project/EnhancedAttributeSelectors
(side note: (mildly) interesting discussion can be found here :
http://james.padolsey.com/javascript/a-better-data-selector-for-jquery/
)

Also, don take it as a sarcasm but there is still good old, if-then-
else javascript construct available ...

Last, but not the least: never underestimate importance fo the
readability of the code. Never.

-- DBJ


On Jun 3, 10:19 am, Már <mar.orlygs...@gmail.com> wrote:
> Here's my pass at creating an elegant if/else 
> plugin:http://mar.anomy.net/entry/2008/11/04/20.00.32/
>
> I've used it quite a bit, and I love it, but...
> I would still vote against adding this sort of thing to the jQuery
> core.
>
> The only real benefit of these sorts of plugins is that they make your
> code more jQuery-ish.
> (You don't have to assign collections to variables, and break your
> chains to add conditions.)
> Meanwhile your code becomes less javascript-ish.
>
> I've also found that assigning collections to variables, actually
> encourages programmers to recycle their collections instead of using $
> (selector) again and again...
>
> --
> Már
--~--~---------~--~----~------------~-------~--~----~
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+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/jquery-dev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to