Open missasammi opened 12 years ago
I meet the same problem,but I have two scrollers with jqm and I hope someone can give me some advice. menu page scroll area (left slide)hide some items that i used ajax generate them, now I have no idea.
Make certain that you either call iscrollview.refresh()
after adding dynamic content. Otherwise, iScroll doesn't know that the height of your content changed.
You can also trigger an updatelayout
event on some element inside the scroller, and that will also cause the iscrollview
to refresh.
First of all,thanks for your advice.As you said that I have changed my code,but It still doesn't work neither call "iscrollview.refresh() "nor trigger an "updatelayout "event .Here is my code:
success : function(ret) {
newContent += ret;
_obj.after(newContent);
$("#menu_content ul").listview("refresh");
$("#menu_content").iscrollview("refresh");
_obj.attr("_onShow", 1);
},
the left area height doesn't changed at all.
Use of an ID is a red flag. It's generally not a good idea with jQuery Mobile. Might this same ID appear on more than one page? (And all those deferred refreshes tell me you have several pages loaded, right?)
Does it work in a one-page example?
It's better to use classes. The worst thing that will happen, then, is that if you don't sufficiently-qualify your selector, you will be selecting more than one element. If you duplicate IDs across pages, there is no telling which one jQuery will select.
I think the problem doesn't as you said that, because this the ID is the only one on every page and when I annotated the right side page ,the left side scroll area height changed.
Hey,guy.I find out why my scroll area height doesn't changed.my left side is non-active page until I changed this attribute to false.
Hi, I am using dynamically generated lists which scrolls correctly using the widget except that I am using a persistent footer which hides the the last list item behind it.I can drag to see the item but on release. it snaps back behind the footer.
Is there a way that i can provide an offset to the scrollable area?
Thanks in advance.