简体   繁体   中英

jQuery Scrolling Script - why isnt it working here?

http://jsfiddle.net/7ypyL/1/

As you can see, the little box that comes first works fine and the jQuery works. However, I want the second scroll bar to look like the other one. You'll notice that both scrollable areas go under the same DIV id, but the second one isn't working.

I'm trying to implement it here: http://ewsprojects.com/~lyons/new.php (click on a thumbnail and then a tag)

How do I fix this? Thanks in advance.

Try to use a class in stead of an id, double ids are not a good practice and in this case that's what goes wrong (document.findElementById() only finds the first one).

Improved jsfiddle: http://jsfiddle.net/7ypyL/9/

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM