In this fiddle http://jsfiddle.net/mjmitche/6nar4/3/, if you drag, for example, the little blue box into the yellow box, then the big black box will turn pink. All of the 4
I'd do (added caching):
var bbx = $("#blackbox");
bbx.css('background-color') === 'rgb(255, 192, 203)' ? bbx.css('background','black') : bbx.css('background','pink')
wroking fiddle (new AGAIN): http://jsfiddle.net/6nar4/37/
I had to change the first operator as css() returns the rgb value of the color