I have an element that has two classes at all times:
<p class="general_description laptop">
<p class="images laptop">
<p class="specs laptop">
One class describes the item (laptop) and the other (general_description, images, specs) describes the state that the page needs to be in to present one of three types of information about the item.
How can I show or hide the <p>
element only if both classes in my selector are present?
For example, if I only want to show the <p>
element that corresponds to both the specs
and laptop
classes, I have tried doing this but it does not work:
$(".specs .laptop").show();