]> git.scottworley.com Git - picsort/blobdiff - picsorter.js
Press 'z' to toggle zoom
[picsort] / picsorter.js
index ff1db27d40ccb3648893a211059e98c8c98d030c..567c2477a6057e8c1bbe353cbb4e116fcb39588f 100644 (file)
@@ -1,3 +1,12 @@
-$( document ).ready(function() {
-  $("#pic")[0].src = "20/" + files[0];
+var exposure = 20;
+var input_index = 0;
+
+function setpic() {
+  $("#pic").attr("src", exposure + "/" + files[input_index]);
+}
+
+$(function() {
+  setpic();
 });
 });
+
+Mousetrap.bind('z', function() { $("#pic").toggleClass("fit_view"); });