title: Get hour minute value from dropdown for initialization only inside setInterval() in javascript
body: <p>I have clock rotation where minute and hour hand need set at particular angle. This angle I am getting from two drop down one for hour hand and other for minute.
  But the problem is when I take value from dropdown using </p>
  
  <pre><code>var f = document.getElementById("minute3r");
  var currentMinute = f.options[f.selectedIndex].value ;
  </code></pre>
  
  <p>both clock hand stuck at one place.
  I want to take initial value of hour and minute from dropdown but only for once, after that i want to add time for both variable so the clock hand rotate like a real clock. Here is my code</p>
  
  <pre><code> setInterval( function() {
            var f = document.getElementById("minute3r");
            var currentMinute = f.options[f.selectedIndex].value ;
            mins=currentMinute;
            var mdegree = mins * 6;
            var mrotate = "rotate(" + mdegree + "deg)";
  
            $("#min").css({"-moz-transform" : mrotate, "-webkit-transform" : mrotate});
  
            }, 1000 );
  </code></pre>
  
  <p>Where <code>mintute3r</code> is my dropdwn</p>
  
  <pre><code>&lt;select id="minute3r" onchange="disableFunc2()"&gt;
          &lt;/select&gt;
  </code></pre>
  
  <p>I tried to put   </p>
  
  <pre><code>var f = document.getElementById("minute3r");
  var currentMinute = f.options[f.selectedIndex].value ;
  </code></pre>
  
  <p>outside the <code>setInterval()</code> but then minute hand simply don't rotate to desired place.</p>
  
  <p>How to get hour minute value from dropdown for initialization only.PLEASE HELP.</p>