Trigger iScroll 4 on all elements with a certain Class
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? Franz You can assign a different ID with the same class "scrollable" and ... $(document).ready(function() { //Created an array for adding n iScroll objects var myScroll = new Array(); $('.scrollable').each(function(){ id = $(this).attr('id');