Welcome to jQuery!

The code example where you use the .each can be written like this:

$('[EMAIL PROTECTED], [EMAIL PROTECTED]')
        .click(function() { return false; })
        .css({ cursor: 'default', textDecoration: 'none' })
        .focus(function() { this.blur(); });

That is part of the huge benefit of chaining. jQuery will apply the
methods to all the elements matched by the selector. Also blur() is a
method of the element itself. So instead of doing this:

$(this).blur();

Which says, give me a jQuery object and then fire the blur event of
the element, you can do this:

this.blur();

Which only says, fire the blur event of the element.

--
Brandon Aaron

On 3/22/07, Rob Wilkerson <[EMAIL PROTECTED]> wrote:
> I'm a new jQuery user and just took it for a spin on a site I've taken
> over.  I blogged my first "use case" if anyone's interested.  Nothing
> revolutionary, just examples (and code samples) of how jQuery saved me
> a lot of time and effort.
>
> http://musetracks.instantspot.com/blog/index.cfm/2007/3/22/jQuery-isSmooth
>
> I'm sure I didn't use the most efficient means available, so I'd
> appreciate any feedback.
>
> Rob
>
> _______________________________________________
> jQuery mailing list
> discuss@jquery.com
> http://jquery.com/discuss/
>

_______________________________________________
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/

Reply via email to