title: How to change degree of gradient on mouse movement?
body: <p>I was inspired by this code sinppet from <a href="http://codepen.io/andreasstorm/pen/syvoL" rel="nofollow">http://codepen.io/andreasstorm/pen/syvoL</a> </p>
  
  <p>HTML -</p>
  
  <pre><code>&lt;header&gt;
      &lt;div id="range"&gt;&lt;/div&gt;
        &lt;div id="currentVal"&gt;background-image: linear-gradient( &lt;span id="spanVal"&gt;180&lt;/span&gt;deg , &lt;span style="color:#4ac1ff"&gt;#4ac1ff&lt;/span&gt;, &lt;span style="color:#795bb0"&gt;#795bb0&lt;/span&gt; )&lt;/div&gt;
  &lt;/header&gt;
  &lt;div class="gradient"&gt;&lt;/div&gt;
  </code></pre>
  
  <p>CSS (stylus) -</p>
  
  <pre><code> html
    height 100%
  
   body
    background-color #292c2f
    font-family monospace
    overflow hidden
  
   .gradient
    height calc(100% - 70px)
    background-image linear-gradient(180deg,#4ac1ff,#795bb0)
    position absolute
    width 100%
  
   header
    background #252525
    height 70px
    line-height 70px
  
   #currentVal
    color #424242
    font-size 14px
    font-weight 800
    padding-left 240px
    span
      color #ccc
  
   #range
    width 180px
    border 0
    height 4px
    background #424242
    outline none
    position absolute
    left 30px
    top 32px
    .ui-slider-handle
      position absolute
      margin 0px 0 0 -7px
      border-radius 100%
      background white
      border 0
      height 14px
      width 14px
      outline none
      cursor pointer
      &amp;:hover
      &amp;:focus
        transform scale(1.1)
    .ui-slider-range
      background #4ac1ff
  </code></pre>
  
  <p>JavaScript (coffeeScript) -</p>
  
  <pre><code>$("#range").slider
    range: "min"
    max: 360
    value: 180
    slide: (e, ui) -&gt;
      $("#spanVal").html ui.value
      bg = "linear-gradient(" + ui.value + "deg,#4ac1ff,#795bb0)"
      $(".gradient").css "background-image", bg
  </code></pre>
  
  <p>In the same way I am trying to implement it on a background of a webpage though I'm not well versed with JavaScript. Is there anyway we could implement the same effect on mouse movement? I mean changing the degree of the gradient along with the position of the cursor on the screen.</p>
  
  <p>Any help would be greatly appreciated!</p>