On 11/17/06, "Jörn Zaefferer" <[EMAIL PROTECTED]> wrote:
> > Or you could call focus on each of the elements in the jQuery object like
> > this:
> >
> > jQuery.fn.fieldFocus = function() {
> > return this.each(function() {
> > if (this.focus) this.focus();
> > });
> > };
> >
> > Ins
> Or you could call focus on each of the elements in the jQuery object like
> this:
>
> jQuery.fn.fieldFocus = function() {
> return this.each(function() {
> if (this.focus) this.focus();
> });
> };
>
> Inside of the each method the 'this' points to the actual DOM element
> and no
On 11/17/06, Roberto Ortelli <[EMAIL PROTECTED]> wrote:
> Hello,
> A few weeks ago I've written a small plugin for that:
>
> $.fn.fieldFocus = function(id){
> document.getElementById(id).focus();
> }
>
> and you call it using:
> $(document).fieldFocus("the_id_of_the_input_field_without_#");
董軒綜 schrieb:
> Maybe can four words less
>
> $('#the_id_of_the_input')[0].focus();
Hehe, yes :-) I tend to use get() for readability...
-- Klaus
___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/
Yeah, thanks Klaus ;)
2006/11/17, Klaus Hartl <[EMAIL PROTECTED]>:
> Roberto Ortelli schrieb:
> > Hello,
> > A few weeks ago I've written a small plugin for that:
> >
> > $.fn.fieldFocus = function(id){
> > document.getElementById(id).focus();
> > }
> >
> > and you call it using:
> > $(docum
Maybe can four words less
$('#the_id_of_the_input')[0].focus();
Klaus Hartl 写道:
Roberto Ortelli schrieb:
Hello,
A few weeks ago I've written a small plugin for that:
$.fn.fieldFocus = function(id){
document.getElementById(id).focus();
}
and you call it using:
$(document).fi
Roberto Ortelli schrieb:
> Hello,
> A few weeks ago I've written a small plugin for that:
>
> $.fn.fieldFocus = function(id){
> document.getElementById(id).focus();
> }
>
> and you call it using:
> $(document).fieldFocus("the_id_of_the_input_field_without_#");
That is exactly the same as i
ust do plain CSS,
> it now works!
>
> Thanks again for the help...
>
> cheers,
> cdelfino
>
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> Behalf Of Erik Beeson
> Sent: Friday, November 17, 2006 10:36 AM
> To: jQuery Discussion.
s!
Thanks again for the help...
cheers,
cdelfino
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Behalf Of Erik Beeson
Sent: Friday, November 17, 2006 10:36 AM
To: jQuery Discussion.
Subject: Re: [jQuery] input field focus help!
Ahh, right, that is th
ssion.
*Subject:* Re: [jQuery] input field focus help!
.focus() does NOT set the focus of an element, it fires all of the
registered onfocus events. Use $("").get(0).focus().
--Erik
On 11/16/06, Clodelio Delfino <[EMAIL PROTECTED]> wrote:
>
> i've downloaded thickbo
()
$("#frmLogin input")[0].focus()
Above doesn't work...either c",)
cdelfino
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Behalf Of Glen Lipka
Sent: Friday, November 17, 2006 8:04 AM
To: jQuery Discussion.
Subject: Re: [jQuery] input field
Friday, November 17, 2006 7:34 AM
*To:* jQuery Discussion.
*Subject:* Re: [jQuery] input field focus help!
.focus() does NOT set the focus of an element, it fires all of the
registered onfocus events. Use $("").get(0).focus().
--Erik
On 11/16/06, Clodelio Delfino <[EMAIL PROTECTE
Thanks Erik for the input but it doesn't work... c",)
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Behalf Of Erik Beeson
Sent: Friday, November 17, 2006 7:34 AM
To: jQuery Discussion.
Subject: Re: [jQuery] input field focus help!
.focus() do
.focus() does NOT set the focus of an element, it fires all of the
registered onfocus events. Use $("").get(0).focus().
--Erik
On 11/16/06, Clodelio Delfino <[EMAIL PROTECTED]> wrote:
i've downloaded thickbox and tried the login demo, the dialog box work as
expected however but when i tried to
i've downloaded thickbox and tried the login demo, the dialog box work as
expected however but when i tried to set an autofocus on the username field,
it doesn't work.
below is a snippet of the code:
default.php has the clickable:
Click Login
login.php is the form with code below:
http://www.
15 matches
Mail list logo