It is right time to share one of nice article with you freinds….
Recently i started working on making websites for mobiles(iPhone). I had a great experience with it. I come across with the image orientation issue with banner in home page. I have done some research on it. Finally i could get the solution for it.
My requirement is that: I need to apply the class dynamically based on the mobile orientation. If mobile is oriented in portrait mode then the widh of banner should be 320px and apply some styles. In other case, If mobile is oriented in landscape mode then the widht of banner should be 480px and apply some styles.
Above requirement can be achieved with the following code: