[jQuery] Re: announcement: jQuery-based generic board game interface

2007-07-09 Thread John Resig
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

[jQuery] Making internet explorer behave with jquery

2007-07-09 Thread Luke
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

[jQuery] Re: Syntactic sugar for checking whether an element exists

2007-07-09 Thread RobG
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;

[jQuery] Re: Syntactic sugar for checking whether an element exists

2007-07-09 Thread Erik Beeson
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

[jQuery] Re: Random number of events required on page

2007-07-09 Thread Richard D. Worth
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

[jQuery] Re: Syntactic sugar for checking whether an element exists

2007-07-09 Thread Erik Beeson
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

[jQuery] Re: Syntactic sugar for checking whether an element exists

2007-07-09 Thread Klaus Hartl
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

<    1   2