Pregunta

I want to use unwrap but skip from applying this to the first 3 elements and from the last one also.. How can I do this? This is what I tried:

$(".top_link:gt(3)").not(":last").unwrap();

It doesn't seem to work.. What can I do? Thank you for any idea..

¿Fue útil?

Solución

try this

$(".top_link:gt(2):not(:last)").unwrap();

Otros consejos

This may be tricky but you can always count the number of .top_link and subtract one.

$(".top_link:gt(3):lt("+($(".top_link").length - 1)+")").unwrap();
Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top