Why $(window).width() get a wrong width?

341 Views Asked by At

I'm using jQuery to do animations in a site. In desktop browsers, the width that jquery give me is correctly but, when I use my mobile (has 360px of width), jQuery says that the browser has 980px of width..I do not understand the reason..

Some help?

Regards

1

There are 1 best solutions below

2
On

Your phone's browser doesn't see your site as responsive.

Add into your HTML:

<meta name="viewport" content="width=device-width, initial-scale=1">