The script iScroll4 is triggered in this manner
$(document).ready(function() {
var myScroll;
myScroll = new iScroll('wrapper');
});
That however assumes there is an element with ID 'wrapper'. I would like to trigger this on all elements with the class name "scrollable". I have seen this done on a plugin for this script. Any ideas how to do it here?
I've answered that in Mobile Site: Lack of horizontal scrolling on iPhone
Using jQuery and iScroll, you could make the following:
HTML:
CSS:
JS/jQUERY:
This is the test-case ( http://portableideas.net/myRepo/trunk/stackoverflow/www/questions_7869572.html ) for the other question i've pointed out.
You can assign a different ID with the same class "scrollable" and ...
This is a 2 years old conversation to the time i am writting, still this conversation will stay here as long as StackOverflow still alive.
Through search engine i was linked to this conversation as i had similar issue.
However, none of these solve my issue.
In my own idea building on Franz idea you could easily acheive a perfect and simple solution like this:
Dynamically assign IDs to the expected scollable elements individually and tell the iScroll5 to make them scrollabile.
This may help someone