动态创建的flowplayer可滚动addItem滚动出容器
我正在创建一个水平可滚动列表,它也是可编辑的。该列表的容器的大小是根据浏览器可见区域的宽度动态变化的。当我有一个填满屏幕的项目列表并添加一个新项目时,容器会滚动经过新添加的元素,到达空白屏幕。如果我使用“上一页”按钮向后滚动,我确实会看到它。我已附加用于动态添加新项目的代码。
我尝试使用 .move 和 .seekTo 函数到达正确的位置,但我的“上一个”按钮被随机禁用,因此我无法向后滚动。
有任何人指点吗?
var speed = 200;
var parent = $("#main-container").data("scrollable");
parent.end(speed);
var clone = $("#thumbnail-clone").clone(true, true);
var input = clone.find(".text-input");
clone.attr("id", newid);
parent.addItem(clone);
input.show();
clone.show();
input.focus();
I am creating a horizontal scrollable list which is also editable. The size of the container of this list is dynamic based on the width of the visible area of the browser. When I have a list of items which has filled up the screen, and I add a new Item, the container scrolls way past the newly added element, to a blank screen. If I scroll back using the "prev" button, I do see it. I've attached code which is used to dynamically add the new item.
I tried to use the .move and .seekTo functions to get to the correct location, but my "prev" button gets randomly disabled so I can't scroll back.
Any pointers from anyone?
var speed = 200;
var parent = $("#main-container").data("scrollable");
parent.end(speed);
var clone = $("#thumbnail-clone").clone(true, true);
var input = clone.find(".text-input");
clone.attr("id", newid);
parent.addItem(clone);
input.show();
clone.show();
input.focus();
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论