-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathreader.js
More file actions
executable file
·34 lines (27 loc) · 757 Bytes
/
reader.js
File metadata and controls
executable file
·34 lines (27 loc) · 757 Bytes
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
//The code that is fired upon page load
//to check your plugin js is working uncomment the next line.
//$("body").append('Test');
var $div = $('<div />').appendTo('body');
$div.attr('id', 'reader');
$("#reader").css({
"display":"none",
"background":"blue",
"position": "absolute",
"float": "left"
});
$(document).bind('mousemove', function(e){
var w = 300;
var wS = w + "px";
var h = 100;
var hS = h + "px";
$('#reader').css({
left: e.pageX - (w/2),
top: e.pageY - (h+50),
width: wS,
height: hS
});
$("#reader").css({"display":"block"});
});
function myFunction() {
alert("I am an alert box!");
}