How To : Put Like / Follow Button Under Div on Mouse Move With jQuery [Tutorial]
Well its really simple to put like button or follow button under your mouse pointer and it really looks cool but sometimes irritating too, Well but its good if you want to increase your subscribers or your followers faster.
Okay first we can get like button or follow button code from twitter / facebook and wrap it in a div with id called `dtDiv` and write some inline styling to hide it and give it position.
Okay now we write some jquery codes to show this div on mouse move and put his position under mouse pointer.
$(document).mousemove(function(e){
$(“#dtDiv”).show();
$(“#dtDiv”).css(“left”,e.pageX);
$(“#dtDiv”).css(“top”,e.pageY);
});
Okay first we can get like button or follow button code from twitter / facebook and wrap it in a div with id called `dtDiv` and write some inline styling to hide it and give it position.
Okay now we write some jquery codes to show this div on mouse move and put his position under mouse pointer.
$(document).mousemove(function(e){
$(“#dtDiv”).show();
$(“#dtDiv”).css(“left”,e.pageX);
$(“#dtDiv”).css(“top”,e.pageY);
});
0 comments:
Post a Comment