使用.click更改DIV背景颜色(function(){

Gen*_*ial 5 jquery background colors click

如何使用jQuery更改背景颜色.click(function(){

div normal与绿色,单击时更改为红色背景颜色

<div class="stileone">
   Div Content
</div>
Run Code Online (Sandbox Code Playgroud)

Zol*_*oth 11

$(".stileone").on("click", function() {
    $(this).css("background", "red");
})
Run Code Online (Sandbox Code Playgroud)

DEMO