简体   繁体   English

带文本的简单模式滑入式-是否需要使用jQuery?

[英]Simple modal slide-in with text-Is it necessary to use jQuery?

I need to simply create a 'popin' or 'slide-in' box containing text( a hidden div) over my existing application. 我只需要在现有应用程序上创建一个包含文本(隐藏的div)的“ popin”或“ slide-in”框。 Being modal is optional but not a requirement. 模态是可选的,但不是必需的。 A simple close button on the box will close(animate it) off the page. 框上的简单关闭按钮将关闭页面(使其具有动画效果)。

Is jQuery necessary to accomplish this? jQuery是否有必要做到这一点?

I would recommend taking a look at th jqueryUI components here is a link for Jhueryui dialog it sounds like what you are looking for. 我建议您看一下jqueryUI组件,这是Jhueryui对话框的链接,听起来像您在寻找什么。

http://jqueryui.com/demos/dialog/ http://jqueryui.com/demos/dialog/

What you're doing is a modal box. 您正在做的是一个模式框。 Jquery has their own modal function, which you can check out: http://jqueryui.com/demos/dialog/ jQuery具有自己的模态函数,您可以检出: http : //jqueryui.com/demos/dialog/

I believe jquery would be easy. 我相信jQuery会很容易。 There are other plugins out there. 还有其他插件。 You can also check out SimpleModal by Eric Martin : http://www.ericmmartin.com/projects/simplemodal/ His plugin has a lot of cool features too 您也可以查看Eric Martin的SimpleModal: http ://www.ericmmartin.com/projects/simplemodal/他的插件也具有很多很酷的功能

It'll be easy to integrate his plugin and you can change your content to your liking. 集成他的插件很容易,您可以根据自己的喜好更改内容。

jQuery is not necessary to do anything. jQuery不需要做任何事情。 After all, you can just write your own Javascript that does whatever jQuery would do. 毕竟,您可以编写自己的Javascript来完成jQuery的工作。 I think for a box like you describe, it wouldn't even be that difficult. 我认为对于像您描述的那样的盒子,它甚至没有那么困难。

jQuery is simply a tool that makes certain Web page interactions easier to program. jQuery只是一种使某些网页交互易于编程的工具。 Like any tool, you need to know when to use it or not. 像任何工具一样,您需要知道何时使用或不使用它。 If you're not already using jQuery on your site, then adding it for one dialog is not necessarily prudent. 如果您尚未在网站上使用jQuery,那么将其添加到一个对话框中并不一定是明智的选择。 On the other hand, if you're already using it, why not use it once more? 另一方面,如果您已经在使用它,为什么不再次使用它呢?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM