作者热门文章
- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我真的很想使用 jQuery 地址插件来深度链接我的 ajax 网站,但说实话,我很难理解如何设置它。
即使是例子似乎也不清楚。
有人有一个简单的例子来说明如何让它工作吗?
最佳答案
我也是第一次经历这个。他们的文档很差,但它是一个非常好的插件。
$.address.init(function(event) {
}).change(function(event) {
// all your application work should be within here.
// each time something changes this will run
// use the api methods to find out what is going on.
event.path // returns the current full path from beyond /#/
event.queryString // returns the query string ex: /#/?page=1
event.value // returns the value /#/Home
// These can all be accessed globally by using $.address.path(), etc
// usage
// example of clicking an a tag set with the ref or href set as a div id
// be sure to set that in the init method above
// Shows the selected div
$('#'+event.value).show();
});
关于jQuery - 让深度链接 jQuery 地址发挥作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1672044/
在 Play 1.x 中有很棒的 play Idealize(和 play eclipsify),它为您最喜欢的 IDE 中的 Play 项目准备了项目文件。 我看到这是在 Play 2.X 中删除的
我是一名优秀的程序员,十分优秀!