JQuery UI 与自定义 jquery 小部件
我想在我的网站上添加选项卡和模式窗口小部件。两个小部件的外观会根据页面的不同而有所不同,但功能是相同的。 我发现 JQuery UI 提供选项卡和模式小部件。我还发现了各种自定义 JQuery 小部件,例如 Eric Martin 的模态窗口 http://www.ericmmartin.com/ projects/simplemodal/ 和 Soh Tanaka http://www.sohtanaka.com/web-design/simple-tabs-w-css-jquery/ 我需要专家的意见来确定使用 JQuery UI 还是自定义 JQuery Widget 是否更好。
I would like to add tabs and modal window widgets all over my website. Both widgets will vary in appearance depending on the page but functionality will be the same.
I found that JQuery UI provides both tabs and modal widgets. I also found various custom JQuery widgets such as modal window by Eric Martin http://www.ericmmartin.com/projects/simplemodal/ and tab menu by Soh Tanaka http://www.sohtanaka.com/web-design/simple-tabs-w-css-jquery/
I need an expert opinion on whether its better to use JQuery UI or custom JQuery Widgets.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
无论你喜欢哪个。如果您正在构建网站,则可以使用自定义插件。优点是您可以选择任何您喜欢的东西,任何按照您的想法运行的东西。
但是,如果您正在构建 Web 应用程序或者需要在页面上加载不同的小部件,则最好使用 jQuery UI 或其他一些完整的小部件框架。您确实可以从一致性中受益,它将使您的生活变得更加轻松,让这些不同的小部件以逻辑方式彼此交互,并使用尽可能少的编码。所有小部件都使用一致的属性、方法和事件命名,您将花更少的时间阅读文档,而花更多的时间充实您的应用程序。您甚至可以使用 themeroller 制作自定义主题以匹配网站的其余部分,所有小部件都不会与其他小部件显得格格不入。
Whichever you prefer. If you're building a website, you can just go with custom plugins. The advantage is that you can pick anything you like, anything that behaves in the exact way you had in mind.
However, if you're building a web application or you need loads of different widgets on a page, it's best to use jQuery UI or some other full widget framework. You can really benefit from the consistency, it will make your life much easier to get those different widgets interact with each other in a logical way, with the least possible coding. All widgets use consistent naming of properties, methods and events, you will spend less time reading the documentation and more time fleshing out your application. You can even use themeroller to make a custom theme to match the rest of your site, none of the widgets will look out-of-place from the rest.