How to find the center of the browser window using JQuery -
How can I find the coordinates of the browser center using jquery?
Why use jQuery? This can be done with simple plain javascript:
var horizontalcenter = Math.floor (window.innerWidth / 2); Var vertical senere = mathematics. Floor (window winsight / 2); To use these, you may have to add the unit, px to the variable.
Edit to apply an integer value to return coordinates
Comments
Post a Comment