[jQuery] scroll method problem

2007-02-02 Thread 杨乐
hello, there is a question about scroll method that following below: $(p).scroll( function() { alert(Hello); } ); pHello/p p onscroll=alert('hello')Hello/p but it's not really work when i write code like this: $(body).scroll( function() { alert(Hello); } ); do you know why? -- yorsal

Re: [jQuery] scroll method problem

2007-02-02 Thread John Keyes
Hi Yorsal, This for use with the CSS overflow property[1]. For example: div class=scroll style=height: 80px; width: 100px; overflow: scroll; pPara1/p pPara2/p pPara3/p pPara4/p pPara5/p /div And now you listen for scroll events on that div: $('.scroll').each( function() {