user3044993
user3044993

Reputation: 1

Full refresh of website's content on iPad orientation change

I am doing a website with Foundation 4. I want to do refresh totally the webpage's contents when user goes from portrait to landscape. I've tried to use this code:

window.onorientationchange = function()
{
    window.location.reload();
}

but it doesn't change totally my website's content

Upvotes: 0

Views: 94

Answers (1)

StaleMartyr
StaleMartyr

Reputation: 778

try :

window.onresize = function(){
     window.location.reload();
}

it works for me.

Upvotes: 1

Related Questions