开发者

Jquery login scrollDown

I'm using JQuery version 1.4.2. My goal is to let the user click the voice 'login' in the top menu to scroll Down the login form (as twitter). Everything works fine, the insertAfter jQuery show the form as I want, but开发者_Go百科 when the login button is clicked, it change its horizontally position by some pixels. How is possible to let the 'login' button fixed after insertAfter (excuse me for the pun) ?


Make insertAfter insert after the login button's container and make sure you set a width on the login button's container. OR you could set the position of the login button to absolute and then it won't move at all


You're going to need to either edit your markup or css. I can't tell you more without seeing both.

-Bill


There could be a few reasons for this. One that possibly comes to mind is that the position is being set before scroll bars appear on the screen and changes it's position. One of my much loved tools is jQuery position, it allows you to absolutely attach the element on the page - perhaps try giving that a go? Otherwise, perhaps hide the element after all the content has loaded using document.load instead of .ready? And lastly, perhaps show some code? :-)

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜