You can make that first line a bit more compact:

$("li").removeClass("even odd")

--Karl

____________
Karl Swedberg
www.englishrules.com
www.learningjquery.com




On Jun 5, 2009, at 11:40 PM, MorningZ wrote:


// delete <li>
then

$("li").removeClass("even").removeClass("odd")
     .filter(":odd").addClass("odd")
     .end()
     .filter(":even").addClass("even");


On Jun 5, 7:57 pm, "Dave Maharaj :: WidePixels.com"
<d...@widepixels.com> wrote:
I have a li layout which have the even odd class applied to them. Each item
in the li has a delete link,click deletes the li but i am left with
li class even
li class even
li class odd
if i delete an odd one or vice versa

how can i upon delete re-assign the even odd classes so they remain looking
correct?

thanks

Dave

Reply via email to