$("#divToggle").toggle(function () { $(this).css("background", "blue"); }, function () { $(this).css("background", "Brown"); }, function () { $(this).css("background", ""); });