Stephan -
Great work! I could definitely see how this would be useful.
--John
On 7/9/07, Stephan Beal [EMAIL PROTECTED] wrote:
Hiya!
The jQ site says that this list is the place to make announcements,
so here it goes...
The past couple of days i've been working on an application for
Basically what I'm trying to do is apply a .text and a .textFocus to
certain elements. for example: input and input:focus, respectively. So
what I've done is this:
I am not concerned with the focus portion at this point... only with
applying the correct class to the correct elements. For some
On Jul 10, 4:50 am, Sean Catchpole [EMAIL PROTECTED] wrote:
I believe that learning jquery returns an array like object is more
useful than creating a .exists() function.
It seems to me that the most common reason for testing if an element
exists is to use it later, so why not:
var element;
Another idea is that if the seletor doesn't select any elements,
return null (as does getElementById() in that case):
...
but that may not be backward compatible. Of what use is an empty
jQuery object?
An empty jQuery object doesn't break chainability:
$('#foo').hide();
Will hide the
On 7/9/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
What I'm trying to figure out how to do is to have jQuery handle
multiple events on one page, that are pulled out a of a database (can
be any amount of numbers).
A good example of what I'm trying to do would be a large FAQ listing,
where
In fact, if you find yourself doing a lot of if(something exists) {
... } else { ...}, you might want to consider trying to move some of
your code into a plugin. Most jQuery functions/plugins already deal
with the if(exists)... part by simply not executing if nothing is
selected. If you really
Felix Geisendörfer wrote:
Felix, not to worry, there's nothing wrong at all with using .length
- and it is obviously faster than a function call.
I figured that by now. I think Matt was much better at explaining why I
think an alternative exists() function is useful - it simply is the most
101 - 107 of 107 matches
Mail list logo