views:

2809

answers:

1

I want my website to change its layout according to the device positon. The site has 2 layout types: vertical(height > width) ang horizontal(width > height).

do you see any solution?

upd: I don't see any complexity in changing the site layout. I want to know is there any event to handle. p.s. will iphone's browser change its orientation if i rotate the device 90 degree? Dave, tnx for emendation.

+5  A: 

There is a javascript event called onorientationchange sent when the orientation changes and also there is a property called orientation on the window object that tells what the current orientation is.

See the documentation for more info and sample.

keremk