Reputation: 1022
I've cached a DOM element in jquery and wondered how i can see if it's hidden or not.
I have no problem doing by a normal selector. With a normal selector i'd do something like this if statement:
if('.someClass:hidden') {
console.log('hidden')
}
else {
console.log('not hidden');
}
But instead of .someClass i had the element cached. Like this, details being the cached element:
$this = $(this);
details = $this.find(".details");
Many Thanks
B
Upvotes: 1
Views: 43