JQuery pop up/ alert needed

半世苍凉 提交于 2020-01-11 13:54:21

问题


I have a list of elements that need to have a corresponding pop up for each element. This is not a pop up where the background is blacked. This is more like a javascript alert although I need to create my own styled button within the pop up with our own bespoke event assigned to it. I need each pop to position itself appropriately next to the relevant item within the UI.

Whats the best way to do this? Are there any examples please? I only want the pop up to show when the visitor triggers an event.

Many thanks,


回答1:


You can easily do this without using jQuery Plugins.

I put together a little example.




回答2:


I suggest you to use Colorbox for pop-up systems. Fırst of all; it is easy to learn and use.

And most importantly: Colorbox won't create conflicts with your other plugins (sometimes fancybox does that).

Some Features:

  • Supports photos, grouping, slideshow, ajax, inline, and iframed content.
  • Lightweight: 10KB of JavaScript (less than 5KBs gzipped).
  • Appearance is controlled through CSS so it can be restyled.



回答3:


What about http://jqueryui.com/demos/dialog/#modal-confirmation
or http://jqueryui.com/demos/dialog/#modal-message



来源:https://stackoverflow.com/questions/11718363/jquery-pop-up-alert-needed

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!