Jquery UI 选项卡预显示?
我正在使用 jquery ui 选项卡。 它有几个事件,如添加、显示等。我希望在将选项卡添加到 html 之前触发一个事件,因为我需要在添加选项卡之前设置选项卡的宽度(出于动态宽度的目的,我似乎无法使用CSS)。
知道如何在实际添加选项卡之前触发预演事件吗?
I am using jquery ui tabs.
It has a couple of events like add, show, etc. I'd like an event that is triggered before the tab is added to the html, because I need to set width of the tab before it is added (for dynamic width purposes that I cant seem to do with CSS).
Any idea how I can make a pre-show event that is triggered before the tab is actually added?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
在添加选项卡之前,您应该能够在选项卡上设置属性。 DOM 元素可以包装在 jQuery 对象中并在附加到文档之前进行操作。
如果没有具体的代码示例,就很难确切地知道您想要实现什么,或者将其置于上下文中。你能发布一些代码吗?
You should be able to set the properties on your tab before it is added. DOM Elements can be wrapped in a jQuery object and manipulated before they are appended to the document.
Without specific code examples, its hard to know exactly what you are trying to achieve, or put it into context. Could you post some code?