http://jsfiddle.net/s5mgX/184/
How can I write this more efficiently where that
1) I can have about 50 scroll content DIV
like in the example above on 1 page but not having开发者_JAVA技巧 the repeat the entire JS implementation
I updated your fiddle. Take a look at http://jsfiddle.net/s5mgX/198/ Anyway, you needed to put the links and content in the same div so they're siblings, then use class instead of id & use a siblings('.content') instead of $('#content')
精彩评论