There is only 1 input inside of that DOM object so I don't think that is 
the issue.  Also like I said, I can console.log(  
jQuery(this).parent().find('.myinput')  ) I get the correct object in the 
console.

-Greg

On Thursday, May 3, 2012 9:28:52 AM UTC-7, Saiful Amri wrote:
>
> try to add :first because class it's counfiuse what element want to focus 
> maybe element that has class more than one.
>
> On Thu, May 3, 2012 at 11:25 PM, Greg Moser <[email protected]> wrote:
>
>> I need to add some simple code to focus on an input once a dropdown is 
>> clicked.  Basically something like this:
>>
>> jQuery('.dropdown-toggle').click(function(e){
>> jQuery(this).parent().find('.myinput').focus();
>> });
>>
>> However this isn't working for me...  If I just console log the 
>> jQuery(this).parent().find('.myinput') I do infact get the correct input 
>> I'm looking for however the .focus() command isn't working.  My only 
>> assumption is that the actual JS that makes the dropdown work, is happening 
>> after this and calling a focus of its own... so how can i tie into the 
>> 'after' of that event?
>>
>> -Greg
>>
>
>

Reply via email to