Skip to content

mrpollo/Screen-Util

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

Screenutil.js

is a simple javascript "object" or "class" that can be used to get the center position of your screen, it was originally created to help in displaying modal windows and making sure they are always on the middle of the page.

(function(d, c){
	d.style.left = c.x - ( d.style.width / 2 );
	d.style.top = c.y - ( d.style.height / 2 );
}( document.getElementById('test'),	screenutil.getScreenCenter() ));

About

Javascript Screen Utilities

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published