Exactly. $("div.image")[4] gives the raw dom element from the jQuery
collection, and not a jQuery "wrapped" element like the OP was expecting
(thus the .show() function isn't available).

Re-wrapping the element like so: $($("div.image")[4]).show() would work. Of
course you'd be better off using $("div.image:eq(4)") or
$("div.image").eq(4) as the above poster mentioned.



MorningZ wrote:
> 
> 
> "But this does NOT
> 
>  $("div.image")[4]."
> 
> Because that is not a jQuery object
> 
> 
> 
> On Jan 25, 4:52 pm, donb <falconwatc...@comcast.net> wrote:
>> Try
>>
>>  $("div.image").eq(4).show()
>>
>> I would only be guessing, but  $("div.image")[4] must gets you
>> something that's not an object possessing a show() method.
>>
>> On Jan 25, 4:41 pm, bartee <bar...@gmail.com> wrote:
>>
>> > bump..
>>
>> > Anyone have any ideas why this does not work.. ????
>>
>> > On Jan 25, 11:01 am, bartee <bar...@gmail.com> wrote:
>>
>> > > This works...
>>
>> > >  $("div.image").slice(4,5).show()
>>
>> > > But this does NOT
>>
>> > >  $("div.image")[4].show()
>>
>> > > Seems like the [4] should work !!
> 
> 

-- 
View this message in context: 
http://www.nabble.com/%24%28%22div.image%22%29-4-.show%28%29----Does-NOT-Work-%21%21-tp21653100s27240p21658851.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.

Reply via email to