I’ve been looking at other frameworks lately, among them LungoJS. After fiddling with the framework I had difficulties creating scrolling views. The docs say that getting a scrolling area is as simple as adding a “scrollable” class to a div – not quite, there are some other requirements.
To get scrolling articles you must have the following structure – notice the DIV that wraps the content:
... <article id="something" class="scrollable"> <div> <!-- This DIV is important!! --> Your content in here </div> </article> ...
If you attempt to create a scrollable div inside an article tag you **must** also set a height for that div, like so:
... <article id="something"> <div id="myDiv" class="scrollable" style="height:300px;"> <div> <!-- This DIV is important!! --> Your content in here </div> </div> </article> ...
Notice the ID in the scrollable divs – ID is **required**, you will see as much in the console if you forget this.
Note the DIV that is the immediate child of the scrollable div – that is also required. No need to style it or add an ID. Your content must be wrapped by a DIV – P’s, Lists and header elements also work. Spans do not.
If the scrolling area is not an article tag then you **must** include the height for the scrolling div, which is illustrated in the second example above.
I noticed a lot of confusion in the forums and was confused myself – IMO the docs should be amended with the above.