SimpleModal - 在一页上使用多个链接来打开具有不同内容的模式
我正在开发一个牙科诊所网站。有一个员工页面,其中包含各个员工的缩略图。我想设计该页面,以便当我单击某个员工时,会显示有关他们及其资格的信息。显然每个员工都有不同的个人资料,所以我该如何去做呢?
我花了很长时间摆弄 DIV ID 和 basic.js 文件,但没有成功。
非常感谢
编辑(当前使用的技术): 简单模态
Im working on a website for a dental practice. There is a staff page which has thumbnails of individual staff members. I would like to design the page so that when I click on a staff member informations about them and their qualifications appear. Obviously each staff member has a different profile so how do I go about doing this
I've spent ages messing around with the DIV ID's and the basic.js file with no luck.
Many Thanks
Edit (Technology currently used):
Simplemodal
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
以下答案可能会引导您走向正确的方向:
使用简单模态 OSX 样式对话框进行多次调用
您需要使用员工信息创建单独的 div,然后使用我提供的链接中的 JS 示例,以编程方式将缩略图链接与员工信息 div 进行匹配。
如果您需要任何补充说明,请告诉我。
更新:此答案适用于使用 SimpleModal 的解决方案
The following SO answer might lead you in the right direction:
Multiple calls with Simple Modal OSX Style Dialog
You'll want to create separate div's with the staff member information and then using the JS example in the link I provided, programatically match up the thumbnail links to the staff member information div.
Let me know if you need any addition clarification.
Update: This answer is for a solution using SimpleModal
编辑此答案是为了使用 JQuery 和JQuery-UI
首先我将指出我们将用来创建对话框的工具:
http://jqueryui.com/demos/dialog/
接下来是一些帮助函数,让您的生活更轻松:
接下来让我们介绍一下您的 html 的外观:
最后理解这个概念:
自动连线对话框的类可以放在任何可点击的元素上。单击该元素时,它将打开关联的对话框,其 ID 在 data="..." 属性中指定。
jqy-modal 的类只能放在 div 标签上。这就是创建模态/对话框窗口的原因。您可以在其上放置一个数据元素来指定标题!
您可以为每个人、触发对话框的元素以及对话框本身执行此操作,对话框本身将被隐藏,直到被触发。
Edit this answer is for using JQuery & JQuery-UI
First I will point out the tool we will be using to make a dialog:
http://jqueryui.com/demos/dialog/
Next a few helper functions to make your life easier:
Next lets cover what your html will look like:
Finally to understand the concept:
the class of auto-wire-dialog can be put on ANY clickable element. When that element is clicked it will open the associated dialog with the ID that is specified in the data="..." attribute.
the class of jqy-modal can ONLY be put on a div tag. That is what creates your modal / dialog window. You can put a data element on it to specify the title!
You do this for each person, element to trigger the dialog and the dialog itself which will be hidden until it is triggered.