Jquery JavaScript DHTML


  
    
    
        $(document).ready(function(){
           function colorEm() {
              var $div = $("div");
              $div.css("background", "red");
              $div.slice(2, 4).css("background", "yellow");   
           }
           $("button").click(colorEm);
        });