How can I find the (x,y) point of the center of the viewable area of the browser?
I am using jQuery, if there are any good jQuery helper functions for this.
How can I find the (x,y) point of the center of the viewable area of the browser?
I am using jQuery, if there are any good jQuery helper functions for this.
Like this:
var x = $(window).width() / 2;
var y = $(window).height() / 2;
If you want the center point of the whole document (not just the viewable area), you can use $(document) instead.