Stripe class for div

前端 未结 3 1378
一向
一向 2021-01-18 21:25

I have a long list of multiple div... let\'s say 20 div

All wrap in another one..

text text
3条回答
  •  挽巷
    挽巷 (楼主)
    2021-01-18 21:40

    jQuery makes it just about as easy as it can be:

    $('#main>div.xyz:even').addClass('grey');

    http://api.jquery.com/even-selector/

提交回复
热议问题