-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
85 lines (76 loc) · 2.28 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>McResponsive</title>
<meta name="description" content="Show off how responsive design looks across different browsers easily with this 4 in 1 viewport tool. See how your site looks on desktop, laptop, ipad & iphone.">
<link rel="stylesheet" href="css/ami.css">
<meta name="viewport" content="width=device-width">
</head>
<body class="ami bg">
<div class="wrapper">
<section class="display">
<div class="mobile">
<iframe id="mobile" scrolling="no" src="http://www.mcnallydevelopers.com">
</iframe>
</div>
<div class="tablet">
<iframe id="tablet" scrolling="no" src="http://www.mcnallydevelopers.com">
</iframe>
</div>
<div class="laptop">
<iframe id="laptop" scrolling="no" src="http://www.mcnallydevelopers.com">
</iframe>
</div>
<div class="desktop">
<iframe id="desktop" scrolling="no" src="http://www.mcnallydevelopers.com">
</iframe>
</div>
</section>
</div>
<input type="hidden" id="url" name="url" value="http://www.tapiaimpresiones.com">
<script src="js/jquery-latest.min.js"></script>
<script src="js/jquery-ui.min.js"></script>
<script>
$(document).ready(function() {
// Change iFrame on a Button Click Event
$(".button").click(function(event){
$("iframe").attr('src', $( '#url' ).val());
});
});
</script>
<script>
$(document).ready(function() {
var a = 3;
$('.desktop,.laptop,.tablet,.mobile').draggable({
start: function(event, ui) { $(this).css("z-index", a++); }
});
$('.display div').click(function() {
$(this).addClass('top').removeClass('bottom');
$(this).siblings().removeClass('top').addClass('bottom');
$(this).css("z-index", a++);
});
});
</script>
<script>
function getUrlVars() {
var vars = {};
var parts = window.location.href.replace(/[?&]+([^=&]+)=([^&]*)/gi, function(m,key,value) {
vars[key] = value;
});
return vars;
}
var first = getUrlVars()["url"];
var first = decodeURIComponent(first);
var first = first.replace(/\#$/, '');
if(first === "undefined") {
// don't do anything.
}
else {
// take the url variable and update the iframes and input field
$("iframe").attr('src',(first));
$('#url').attr('value',(first));
}
</script>
</body>
</html>