-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdevelopify.jquery.js
executable file
·44 lines (30 loc) · 1.41 KB
/
developify.jquery.js
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
(function ($) {
$.fn.developify = function () {
var $this = $(this);
$this.init = function () {
$('body').append('<div class="developify" style="position: fixed; bottom: 0; left: 50%;"><div class="scroll"></div><div class="resize"></div></div>');
$this.refreshAll();
$(window).on('resize scroll', $this.refreshAll);
};
$this.refreshAll = function () {
$this.windowResizeHandler();
$this.windowScrollHandler();
};
$this.windowResizeHandler = function () {
var build = '';
build += '<p>jQuery Window: ' + $(window).width() + ' x ' + $(window).height() + '</p>';
build += '<p>jQuery Document: ' + $(document).width() + ' x ' + $(document).height() + '</p>';
build += '<p>Inner Window: ' + window.innerWidth + ' x ' + window.innerHeight + '</p>';
build += '<p>Outer Window: ' + window.outerWidth + ' x ' + window.outerHeight + '</p>';
$('.developify .resize').html(build);
};
$this.windowScrollHandler = function () {
var build = '';
build += '<p>Top: ' + $(window).scrollTop() + '</p>';
$('.developify .scroll').html(build);
};
if (window.location.host.indexOf('.bojan.izdelava.') > 0) {
$this.init();
}
};
})(jQuery);