title: Uncaught ReferenceError: Invalid left-hand side in assignment (anonymous function)
body: <p>I've implemented the UI Jquery slider <a href="http://jqueryui.com/slider/#steps" rel="nofollow">http://jqueryui.com/slider/#steps</a> and it works very well. But know what I want to do is make the slider moving when clicking on some links. </p>
  
  <p>But I get the error : <em>Uncaught ReferenceError: Invalid left-hand side in assignment</em> <strong>slider.html:88</strong> <em>(anonymous function)</em></p>
  
  <p>so here's my code : </p>
  
  <pre><code>&lt;script&gt;
  
      $(function() {
          $( "#slider" ).slider({
              range: "min",
              value:0,
              min: 0,
              max: 200,
              step: 50,
  
              create: function( event, ui ) {
                  $("#packs a").css("color", "#336799");
                  $("#packs .pack1").css("color", "#b84a00");
              },
              slide: function( event, ui ) {
  
                  switch(ui.value) {
                      case 0:
                          $("#packs a").css("color", "#336799");
                          $("#packs .pack1").css("color", "#b84a00");
                          break;
                      case 50:
                          $("#packs a").css("color", "#336799");
                          $("#packs .pack2").css("color", "#b84a00");
                          break;
                      case 100:
                          $("#packs a").css("color", "#336799");
                          $("#packs .pack3").css("color", "#b84a00");
                          break;
                      case 150:
                          $("#packs a").css("color", "#336799");
                          $("#packs .pack4").css("color", "#b84a00");
                          break;
                      case 200:
                          $("#packs a").css("color", "#336799");
                          $("#packs .pack5").css("color", "#b84a00");
                          break;
                      default:
                          $("#packs a").css("color", "#336799");
                  }
              }
          });
      });
  &lt;/script&gt;
  
  &lt;div id="offers"&gt;
      &lt;div id="slider"&gt;
          &lt;div class="marker" style="left: 124.25px;"&gt;&lt;/div&gt;
          &lt;div class="marker" style="left: 248.5px;"&gt;&lt;/div&gt;
          &lt;div class="marker" style="left: 372.75px;"&gt;&lt;/div&gt;
          &lt;div class="handler"&gt;&lt;/div&gt;
      &lt;/div&gt;
  
      &lt;div id="packs"&gt;
          &lt;a class="pack1" href="javascript:;"&gt;Pack1&lt;/a&gt;
          &lt;a class="pack2" href="javascript:;"&gt;Pack2&lt;/a&gt;
          &lt;a class="pack3" href="javascript:;"&gt;Pack3&lt;/a&gt;
          &lt;a class="pack4" href="javascript:;"&gt;Pack4&lt;/a&gt;
          &lt;a class="pack5" href="javascript:;"&gt;Pack5&lt;/a&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  
  &lt;script type="text/javascript"&gt;
      $(".pack1").click(function() {
          $("#slider").slider("value") = 0; // ERROR
          $("#slider").slider("slide");
      });
      $(".pack2").click(function() {
          $("#slider").slider("value") = 50; // ERROR
          $("#slider").slider("slide");
      });
      $(".pack3").click(function() {
          $("#slider").slider("value") = 100; // ERROR
          $("#slider").slider("slide");
      });
      $(".pack4").click(function() {
          $("#slider").slider("value") = 150; // ERROR
          $("#slider").slider("slide");
      });
      $(".pack5").click(function() {
          $("#slider").slider("value") = 200; // ERROR
          $("#slider").slider("slide");
      });
  &lt;/script&gt;
  </code></pre>
  
  <p>Si I see that the error is related to this line : <code>$("#slider").slider("value") = Something</code></p>
  
  <p>Do you, please have any idea about this ?</p>
  
  <p>Thank you.</p>