Skip to content

Commit

Permalink
Add simple mobile simulator
Browse files Browse the repository at this point in the history
  • Loading branch information
esamattis committed May 26, 2012
1 parent f7481af commit d4ee20d
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions source/mobilesimulator.html
Original file line number Diff line number Diff line change
@@ -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.