In HTML I have a table that is used as a grid. Now, I want to attach an event to this table, that when a scroll up/down is triggered, then my ScrollUp/ScrollDown function is called.
views:
43answers:
2
+2
A:
You need some JS Framework to simply your development and not reinvent the wheel.
Here is examples for Mootools
And here for JQuery
Alex
2010-09-09 13:09:48
Are you saying that javascript frameworks can do things that javascript can't?
patrick dw
2010-09-09 13:15:11
@patrick dw-> Frameworks are built as layer on the basic javascript implementation. Problem with JS is that each browser has its own implementation/interpretation of JS. Frameworks work around this and coding less complex. A good example is the way browsers handle events and/or AJAX calls, each browser does it in his own special way. Using a framework shields you from the need to learn all quirks of the different implementations. They also can provide you with easy to use stuff which is not in JS by default (but can be created yourself, but in that case you are reinventing the wheel).
Gertjan
2010-09-09 13:19:54
@Gertjan - Sorry, I was just making a point because the answer states that you *need* some JS Framework, which is simply not true.
patrick dw
2010-09-09 13:23:36
@patrick dw - I did not mean that. I am talking about framework because it makes development easy and fast. Plus it has plenty of other goodies as little cost (15k gzipped for mootolos, that is practically nothing)
Alex
2010-09-09 13:30:36
@Alex - I don't disagree. Javascript libraries are great. It's just not correct to imply that you ever need to use a js library to accomplish something in javascript.
patrick dw
2010-09-09 13:34:47
@patrick dw: Off course it is never *needed* to use a library/framework. Since the library is JS (and the source can be read), you are able to build the same code yourself. So you don't really need it (everything a library does you can create yourself), but it can sure help you save time and a lot of debugging. On the other hand knowing what a certain piece of code does (your own, but also framework code) is very useful and helps you become a better developer.
Gertjan
2010-09-13 06:22:54
@Gertjan - That is my exact point. The answer originally stated *"You need some JS Framework."* Which is not true. The part that says *"to simply your development and not reinvent the wheel"* was added after I commented (see the revisions). There are many new users out there who don't understand the relationship between a js library and javascript. So when someone asks a question on how to do something in javascript, it is misleading to say that you *need* a javascript library. It implies that these libraries somehow *add* to javascript, when they are merely *pre-written* javascript.
patrick dw
2010-09-13 12:19:46
+2
A:
If your looking for a cross browser, JavaScript framework independent version then this will do what you need
John Doherty
2010-09-09 13:14:08