]> git.scottworley.com Git - picsort/commitdiff
Keep an input_index
authorScott Worley <scottworley@scottworley.com>
Thu, 27 Feb 2014 19:39:13 +0000 (11:39 -0800)
committerScott Worley <scottworley@scottworley.com>
Thu, 27 Feb 2014 20:15:44 +0000 (12:15 -0800)
picsorter.js

index c51b51ed6ef64845d73e9f54d46d93d4f711b0d1..c87882c0fcec29b81a36eb521f0b024e7d1a9c2d 100644 (file)
@@ -1,9 +1,10 @@
 var exposure = 20;
+var input_index = 0;
 
-function setpic(pic) {
-  $("#pic").attr("src", exposure + "/" + pic);
+function setpic() {
+  $("#pic").attr("src", exposure + "/" + files[input_index]);
 }
 
 $(function() {
-  setpic(files[0]);
+  setpic();
 });