I have a div in which there is criterion to apply different class. For example if in loop i is odd then .odd-product is applied to the div and if i is even then .even-product is applied to the div.
Here it is:
<div id="product"<?php if($i%2==0){?>class="even-product"<?php } else {?>class="odd-product"<?php } ?>>
Now I reference that div in the following way in jQuery:
$divClass=$('#product').attr("class");
Now I want to hide a div whose class name is contained in $divClass variable. How to do that?