From: Scott Worley Date: Thu, 27 Feb 2014 19:39:13 +0000 (-0800) Subject: Keep an input_index X-Git-Url: http://git.scottworley.com/picsort/commitdiff_plain/ed9d7c54c1259e961660336edac95a511fa0be8f?ds=inline Keep an input_index --- diff --git a/picsorter.js b/picsorter.js index c51b51e..c87882c 100644 --- a/picsorter.js +++ b/picsorter.js @@ -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(); });