开发者

jquery slider breaks on page refresh

I have a jquery content slider on a site I'm developing. I am having a strange problem that seems to be across all browsers and that is the slider slides the wrong distance if the page is refreshed via the refresh button.

To re-create the problem please follow these steps -

click this link http://www.aus-media.com/dev/site_BYS/index.html

then click on the 'About Bikram Yoga' menu item at the bottom. Click on the 'more' and 'back' tabs on this page and you will notice it works fine. Then refresh the page by clicking the refresh button and try the more and back buttons again. I'm a bit of a javascript newby so I'm lost to why it's d开发者_如何学JAVAoing this. Any help would be great.

Thanks Nik


Patrick you have lead me in the right direction. All I had to do was set the width of the <ul> inline on the html page. So it read like this -

<ul style="width: 920px">

This stops the width of the <ul> being changed when the page refreshes. I am guessing this is why it's not unusual to see inline styles in these types of situations.

Thanks again!

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜