使用ajax更改fancybox的内容(Changing content of a fancybox with ajax)

编程入门 行业动态 更新时间:2024-10-27 20:31:41
使用ajax更改fancybox的内容(Changing content of a fancybox with ajax)

我的菜单中有一个链接,打开一个带有一些ajax内容的fancybox。 此框包含链接,如fancybox中显示的数据菜单。 我希望能够点击这些链接并更改fancybox的内容,但我所管理的只是打开一个新的框,这会使屏幕淡入白色并返回,这使它看起来像是闪烁。

我尝试使用一组内容字典来改变它但无法让它加载其中任何一个。 我还添加了一个相关的链接,使它成为一个侧面有箭头的专辑,所以我可以去下一个/上一个,这可以正常工作,除了那不是我想要的导航类型。 它必须可以通过链接来做同样的事情,但我无法弄清楚如何。 谁能帮我这个?

编辑:我试过的一些小事。

I have a link in my menu that opens up a fancybox with some ajax contents. This box contains links, like a menu for the data shown in the fancybox. I would like to be able to click these links and change the content of the fancybox but all I manage is to open a new box instead, which makes the screen fade to white and back which makes it look like it's flickering.

I tried using an array of content dictionaries to just change the but couldn't get it to load any of them. I've also added a rel to the links making it a album with arrows on the side so I can go to the next/previous and that works fine except that's not the type of navigation I want. It must be possible to do the same through links instead, but I can't figure out how. Can anyone help me with this?

Edit: a small jsfiddle of some things that I tried.

最满意答案

Fancybox支持iframe。 您可以改为制作iframe。 并在那里放入另一个html页面。

Fancybox supports iframes. You could make an iframe instead. And put in another html-page there.

更多推荐

本文发布于:2023-04-28 08:51:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1331382.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:内容   fancybox   ajax   Changing   content

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!