Permalink
Browse files

Add simple mobile simulator

  • Loading branch information...
epeli committed May 26, 2012
1 parent f7481af commit d4ee20d04742d1603cee431e310c655cfb73d5c2
Showing with 16 additions and 0 deletions.
  1. +16 −0 source/mobilesimulator.html
@@ -0,0 +1,16 @@
+<!doctype html>
+<input id=slider type=range />
+<span id=value></span>
+<br>
+<iframe src=/ height=600 width=300></iframe>
+
+<script type="text/javascript" src=http://code.jquery.com/jquery-1.7.2.min.js></script>
+<script type="text/javascript">
+var iframe = $("iframe");
+var value = $("span");
+$("#slider").on("change", function(e) {
+ var width = this.value * 6;
+ iframe.prop("width", width);
+ value.text(width);
+});
+</script>

0 comments on commit d4ee20d

Please sign in to comment.