I have a span which consist of 6 divs(4 resize, 1 rotate, 1 property box)
The following functionality i need when onclick button:
How to remove the last div from the span..? Please help me. Thanks in Advance...
$(document).ready(function()
{
$('button').on('click', function()
{
$('.workspace > span').find('div').removeClass();
$('.workspace > span').find('div').eq(6).remove();
});
});
My code in JSfiddle..!
Instead of
$('.workspace > span').find('div').eq(6).remove();
Use(instead of eq(6)
try eq(5)
)
$('.workspace > span').find('div').eq(5).remove(); //eq indexing starts from 0.