他们如何填写本网站的盒子?本网站、盒子

2023-09-10 21:03:45 作者:断肠回首处

有谁知道JS或插件等用于填充内容和位置www.jwt.com主页盒子?当你向下滚动,更多的框将通过AJAX绘制。

Does anyone know what JS or plugin etc that is used to populate the content and position the boxes on www.jwt.com home page? When you scroll down, more boxes will be drawn via AJAX.

有没有现成可用的插件,我可以使用相同的功能?

Is there any ready available plugin that I can use for the same functionality?

感谢

P / S:我不知道为什么他们投来关闭这个线程,因为我学到了很多东西,因为我这个不到24小时前张贴者试图在这里给出的建议。这可能不是对你有帮助,但它非常有帮助我这样的人。

p/s: I don't know why they voted to close this thread since I have learned a lot since I posted this less than 24 hours ago by trying out the advice given here. This may not be helpful to you but it has been very helpful to people like me.

推荐答案

从我可以告诉,这是JQuery的。 当您滚动,也有GET请求: http://www.jwt.com/home/index/page/# (#是虚拟的页码,即2,3等)

From what I can tell, it's JQuery. As you scroll, there are GET requests to: http://www.jwt.com/home/index/page/# (# being virtual 'page numbers', i.e. 2,3 etc)

这些返回JSON响应其包括由被添加到页面DIVS和其他的HTML HTML属性

These return a JSON response which includes an html attribute that is made up of DIVS and other html that are added to the page.

从compile.js内的评论,这样的事情:/ * /js/lib/address.js * /等等......它看起来像compile.js基本上是一个包含许多小的.js文件的文件,并提供'时间都在一个文件中(一个HTTP请求/响应)。这是许多框架会为你做(红宝石@ Rails的提供了这一点)。

From the comments within compile.js, things like: /* /js/lib/address.js */ etc... it looks like compile.js is basically a file that incorporates many smaller .js files, and delivers 'em all in one file (one http request/response). This is something that many frameworks will do for you (Ruby@Rails offers this).

找萤火虫如果不是已经在使用它。我觉得它使理解这样的页面更容易(即你可以看到Ajax响应/实时请求)

Get Firebug if not already using it. I find it makes understanding such pages easier (ie you can see the ajax response/requests in real-time)

补充: 我不知道一个插件,但是这不应该是太难复制。 你基本上有一个事件(如jQuery的滚动)触发Ajax调用,并且当Ajax调用成功返回,你抓住的HTML并将它添加到现有的内容。的

Added: I don't know of a plug-in but this should not be too hard to replicate. You'd basically have an event (like jquery's "scroll") that triggers an ajax call, and when that ajax call returned successfully, you'd grab the html and append it to existing content.