JQuery - image refresh
<p>Can anyone tell me why the first block of code works, but not the other two?</p>

<pre><code>setInterval(function() {
  var url = "http://192.168.2.5:8080/?action=snapshot" + Math.random();
  $("#webcam2").attr("src", url); 
}, 1500);
</code></pre>

<p>Not working:</p>

<pre><code>setInterval(function() {
  var url = String(Math.random());
  $("#webcam2").attr("src", "192.168.2.5:8080/?action=snapshot" + url);
}, 1500);
</code></pre>

<p>nor:</p>

<pre><code>setInterval(function() {
  $("#webcam2").attr("src", "192.168.2.5:8080/?action=snapshot" + Math.random());
}, 1500);
</code></pre>
