在静态页面上使用 jQuery 过渡动画?
我正在开发一个客户的网站,该网站的表格中有一个产品数据库,左侧有一个菜单。目前,单击新菜单条目会在新页面上显示一组新产品。
客户希望我更改站点,以便当用户单击菜单条目时,内容会使用 jQuery Quicksand 插件.
但是,Quicksand 插件无法跨页面加载工作。您对我如何在不重写网站整个结构的情况下实现这种效果有什么建议吗?我查看了 History.js,以及 this gist 它提供了一个书签,可以通过 History 自动 ajaxify 站点.js。在此之前我认为这是不可能的,但现在我想知道,我可以使用类似的技术来以某种方式允许 Quicksand 插件在各个页面之间转换吗?
I'm working on a client's website that has a database of products in a table with a menu on the left side. Currently, clicking on a new menu entry brings up a new set of products on a new page.
The client wants me to change the site such that when a user clicks on a menu entry, the content transitions using an effect like that in the jQuery Quicksand plugin.
However, the Quicksand plugin does not work across page loads. Do you have any advice on ways I could achieve this effect without rewriting the entire structure of the site? I had a look at History.js, and this gist which provides a bookmarklet to automatically ajaxify a site via History.js. Prior to this I did not think that was possible, but now I wonder, could I use a technique similar to this to somehow allow the Quicksand plugin to transition between the various pages?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
为了在客户网站上的页面之间进行转换,我使用 jquery ajax 调用。我的每个页面都有自己的 .php 文件。然后我使用 $.ajax 来调出它。
对于过渡,我使用 Jquery UI,它提供了一些非常好的过渡。
至于浏览器历史记录,我使用jHash。使用和实现它有点令人沮丧,但是如果您了解它的工作原理等,您会对其功能感到惊讶。
To transition between pages on my customers websites i use jquery ajax calls. i have each page in its own .php file. and then i use $.ajax to bring it up.
For transitions i use Jquery UI that provides some very nice transitions.
And as for the browser history, i use jHash. Its a bit frustrating to use and implement, but if you understand how it works and etc, you will be amazed by its power.