将参数传递给 jcarousel itemLoadCallback 方法
我们如何将参数传递给 jcarousel itemLoadCallback 方法?
谢谢
How can we pass arguments to jcarousel itemLoadCallback method?
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
据我所知,您不能直接将参数传递给 itemLoadCallback 。 itemLoadCallback 执行您给它显式传递这些参数的函数。您必须修改 jcarousel 才能发送其他参数。我还想了解您想要实现的目标,因为也许还有另一种方法可以实现您想要的目标。你可以做类似下面的事情,这应该足以满足我假设你正在尝试做的事情:
这是我会如何做的
You can't directly pass arguments to the itemLoadCallback as far as I can see. itemLoadCallback executes the function you give it passing in explicitly those arguments. You'd have to modify jcarousel to send additional arguments. I'd also like to understand what you're trying to achieve as maybe there is another way to achieve what you want. You could do something like the following, which should suffice from what I assume you're trying to do:
Here is how I would do it