I need help understanding this script.

I need help understanding this script.

Im following a tutorial and the person did not explain it well enough and Im pretty lost!
So if you can just tell me what jQuery is doing!


  1. <body>

  2.     <h1>My Website</h1>

  3.         <button data-file="day">Day</button>
  4.         <button data-file="night">Night</button>

  5.         <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js" ></script> 

  6.         <script>

  7.         (function() {
  8.             var link = $('link');

  9.             $('button').on('click',function(){
  10.                 var $this =$(this),
  11.                     stylesheet = $this.data('file');

  12.                 link.attr('href',stylesheet + '.css');

  13.                 $this
  14.                     .siblings('button')
  15.                         .removeAttr('disabled')
  16.                         .end()
  17.                     .attr('disabled','disabled');
  18.             });
  19.         })();

  20.         </script>
  21. </body>