I am having an issue with jQuery that I can't seem to figure out.
If I do console.log($(window).width()/2)
I get a numerical value.
If I do $('.modal_box').outerWidth()
I get a numerical value.
However if I try to do console.log($(window).width()/2 - $('.modal_box').outerWidth())
I get NaN. If I do the same equation but replace the -
with +
it works.
The window width is always wider than the .modal_box
.
Why could this be? It is very frustrating.