Jamie Hutber
Jamie Hutber

Reputation: 28076

window.innerWidth won't work with internet explorer windows mobile

So i am simply wanting to output the current viewport of the document

$('#dimensions').text(window.innerWidth + 'x' + window.innerWidth);

Does not work and comes back as undefinedxundefined in internet explorer mobile.

Upvotes: 0

Views: 1632

Answers (1)

Jamie Hutber
Jamie Hutber

Reputation: 28076

Found the answer, i shouldn't have been looking for 'windows mobile' and just look for normal Internet Explorer:

document.body.clientWidth

Upvotes: 1

Related Questions