javascript - Need help on background colour on selected image mouse down. and remove the background to other image that is selected -
// This yellow background color on me img, but if I choose another IMG this backend The color selected will not remove the first IMG:
$ ('img'). Musudaun (function () {var $ selectedDiv = $ (this). Parent (); var divId = $ selectDiv.attr ( 'id'); Wartmancol = divId [1]; Wartmanravli = divId [3]; $ ( "# R "+ currentcall +" c "+ running rouge. Css (" background "," yellow ");});
I do this:
$ ( 'IMG'). Mosudown (function () ($ ('IMG'). CSS ('Background', ''); // Color of the background color will also set back whatever color you need. Var $ selectedDiv = $ (this) .Parent (); var divId = $ selectDiv.attr ('id'); currentCol = divId [1]; currentRow = divId [3]; $ ("# R" + Current call + "c" + current release). CSS ("background", "yellow");});
Comments
Post a Comment