Some code that is not working as expected has the following:
$('#' + myId).center();
This code is not working properly. The odd part is that I cannot find .center() documented in jQuery or javascript. It is not a function in our code either.
The code "kind of works". It centers the div on the page, but only if the width of the browser is smaller than a threshold. Otherwise, it positions it unexpectedly.
Most likely this code was added by a developer who found something about it online. However, I cannot find anything. Is this a deprecated method?
I should add that the objective is the center an absolutely positioned div in the viewport. That is, the user has scrolled to the bottom of the page, clicks a button, a popup shows, but it needs to be centered in the currently viewed part of the screen.