I have a list of divs (div.row) on which I need to update the background color. In I am setting the background color with CSS via div.row: nth-child (weird) and div.row: nth: child (even) ..
div.row's Is being removed with one click - and then it succeeds, I need to update its full line, so even now every other has a different background ..
How can I do this I received?
My script is correct now:
& lt; Script type = "text / javascript" & gt; $ (Document) .ready (function () {$ ("a.delete"). Click (function () {$ .ajax ({type: "POST", url: "...", data: {this_page_id : Css ("display", "block");}, async: false, data type: "$ (this) .prev () .pre () .val ()}, success: function () {$ (". Html "}); $ (" # r "+ $ (this) .prev (). Val ()). Slideshow (); var i = 1 $ (" div.row "). Each (function (index) { If (i% 2) {$ (this) .css ('background-color', '# ffffff');} and {$ (this) .css ('background-color', '# ececec');} i ++;});});}); & lt; / script & gt;
jQuery selectors are selected:
$ ('Div.row: even'). CSS ('background $ ('Div.row: weird'). CSS ('background-color', '#ACC'); A big list here
Comments
Post a Comment