The html will look like
<div class="class1 selected">
<div class="innerclass">value</div>
</div>
in "class1" the class "selected" will come via some condition. So I want to get the value of "innerclass" when "class1" has class "selected". How can I get this value via jquery?
Try this:
$('.class1.selected .innerclass').text();
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With