Sunday, 8 September 2013

It's not supposed that children equal 2 should be hidden?

It's not supposed that children equal 2 should be hidden?

I have this HTML code:
<ul id="product_create-header" class="stepy-header">
<li id="product_create-head-0" class="stepy-active">
<div>Categoría</div><span>Categoría</span>
</li>
<li id="product_create-head-1">
<div>Producto</div><span>Producto</span>
</li>
<li id="product_create-head-2">
<div>Variaciones</div><span>Variaciones</span>
</li>
<li id="product_create-head-3">
<div>Detalles</div><span>Detalles</span>
</li>
<li id="product_create-head-4">
<div>Condiciones</div><span>Condiciones</span>
</li>
</ul>
In order to hide the children element equal to 2 I made this code:
$('#product_create-header').children().eq(2).hide();
$('#product_create').find('fieldset').eq(2).hide();
But it's not working since "Variaciones" still appearing, what's wrong in
my code? See the image attached

No comments:

Post a Comment