Selecting jquery elements with brackets []

jquery

Solution

`$('div.note')[0]` gives you a javascript object, not a jQuery object, and removeClass is a jQuery method. You need to convert it to a jQuery object before using jQuery methods.

Try this,

$($('div.note')[0]).removeClass('hidden');

or

$('div.note').eq(0).removeClass('hidden');

Problem

Why doesn't this work ``` $('div.note')[0].removeClass('hidden'); ``` I get this error from firebug: ``` TypeError: note.removeClass is not a function ```

Original source