title: jquery .css change background-image
body: <p>I'm trying to learn javascript with my book. I wrote my code exactly the same as is written but my code(jquery) that changes background-image doesn't work.
  I searched many times and checked if it has any errors, but I can't find why</p>
  
  <p>Here is my Code</p>
  
  <pre><code>  &lt;script&gt;
       $(function(){
           var stage = new Kinetic.Stage({
               container : "kinetic_stage",
               width:320,
               height:240
           });
           var layer = new Kinetic.Layer({
               name :'root_layer'
           });
           var scrollPos = {x:0,y:0};
           var cutter = new gbox3d.Kinetic.Util.Cutter(layer);
           $('#btn_test').on('click',function(){
               var cut_rect = cutter.getRect(scrollPos);
               $('#text_rgn').text(JSON.stringify(cutter.getRect(scrollPos)));
               var sheet = $('#sprite_window.sheet');
               $('#sprite_window.sheet')
                  .css('background-image','url(./res/screenshot.jpg)');
               $('#sprite_window.sheet')
                  .css('width',cut_rect.width+'px');
               $('#sprite_window.sheet')
                  .css('height',cut_rect.height+'px');
              var posx = 320/2-cut_rect.width/2;
              var posy = 240/2 - cut_rect.height/2;
              $(sheet).css('top',posy+'px');
              $(sheet).css('left',posx+'px');
              $('#sprite_window.sheet').css('background-position','-'+cut_rect.sx+'px-'+cut_rect.sy+'px');
           });
  
           $('#main_window').on('scroll',function(evt){
               $('#kinetic_stage')
                  .css('top',evt.currentTarget.scrollTop+'px');
                  $('#kinetic_stage')
                  .css('left',evt.currentTarget.scrollLeft+'px');
              scrollPos.y = evt.currentTarget.scrollTop;
              scrollPos.x = evt.currentTarget.scrollLeft;
           });
  
           stage.add(layer);
       });
   &lt;/script&gt;
  </code></pre>
  
  <p>If I click the button, sprite_window should get the image but it shows just the white blank space</p>
  
  <p>Can anyone tell me why??</p>