I have the following css and html ...
.hide
{
display:none;
}
<div>
<span class='kardashian hide'>Kimmy</span>
</div>
with the following jquery.
$('div').live('click', function(){
alert($('kardashian', this).val());
});
If I remove the hide class, I get Kimmy, as I expected, but when it has a hide class, do I get nothing? How can I get the text of a hidden element in jQuery?
source
share