watusi / jquery-mobile-iscrollview

JQuery Mobile widget plug-in for easy use of the iScroll javascript scroller.
408 stars 183 forks source link

iscrollview inside of an external jqm panel #152

Closed MaximSpirin closed 9 years ago

MaximSpirin commented 9 years ago

Hello, did anybody implement iscrollview inside of a jqm panel(preferably external ie not nested in a page)? As I see data-iscroll attribute doesnt force browser to create an instance of iscrollview and the document structure remains the same as I have defined i.e. it doesnt add all auxiliary items/classes like iscroll-wrapper..etc. As the panel is an external one I am creating that it manually as by calling:

$(panelElement).panel();
$(panelElement).trigger("create");

And then call $(panelElement).trigger("updateLayout"); after each DOM manipulation jqm version is 1.4.3 and iscrollview is the last stable version.

Any advice will be highly appreciated.

Thanks, Max

frankie-loves-jesus commented 9 years ago

From what I gather iScrollView is obsolete. Personally I replaced jQM's native panel with Snap.js (at least until jQM's native panel becomes scrollable in version 1.7):

Hope it helps.

jtara commented 9 years ago

I use it to scroll inside of popups. I've never tried a panel, and I don't think it would be easy, because the panel code itself assumes it is the height of the entire document. The panel code would need to be re-written.

I do something similar to a panel, but it does not open and close. It is just a scrollable sidebar that I use for some navigation (like the jQuery Mobile documentation "quick index"). I show the sidebar when the screen is landscape, and hide it when it is portrait. There I do use iscrollview to scroll within the navigation sidebar and the main content separately.