169
rated 0 times
[
170]
[
1]
/ answers: 1 / hits: 16097
/ 11 Years ago, mon, may 6, 2013, 12:00:00
How can I get a #<HTMLDivElement>
as a jQuery object?
I need to do the following: I have a list of div's with the class contents. So I iterate over it until I find the one with the additional class: test
here is my code:
$.each( $(.contents), function( key, value ) {
if (value.hasClass(test))
{
alert(got it);
}
});
I'm getting the exception: Uncaught TypeError: Object #<HTMLDivElement> has no method 'hasClass'
More From » jquery