加载图像上单击具有AJAX(jQuery的)单击、图像、加载、jQuery

由网友(時間煮雨莪煮魚i)分享简介:我有一个移动网站,与所有在一个PHP页面的内容,和网页(或div的比较),互换使用jQuery。我想,加快装载时间和大头什么必须加载是在每个人的生物图象。我想使用jQuery只加载人物形象时,他们的生物导航到。我猜我需要使用AJAX,因为我们不能依赖于一个页面刷新。任何指针?谢谢!I have a mobile si...

我有一个移动网站,与所有在一个PHP页面的内容,和网页(或div的比较),互换使用jQuery。我想,加快装载时间和大头什么必须加载是在每个人的生物图象。我想使用jQuery只加载人物形象时,他们的生物导航到。我猜我需要使用AJAX,因为我们不能依赖于一个页面刷新。任何指针?谢谢!

I have a mobile site, with all the content on one PHP page, and the pages (or div's rather), are swapped with jQuery. I want to speed up the load time, and the bulk of what has to be loaded are images on each persons bio. I would like to use jQuery to only load the persons image when their bio is navigated to. I'm guessing I need to use AJAX because we can't rely on a page refresh. Any pointers? Thanks!

推荐答案

您可以使用jQuery的负载加载图像的DOM完成后装入

you can use the jquery load to load the image after the dom is completed to load

$(function(){
   $("#imgUser").load("images/testimg.jpg");  
});
阅读全文

相关推荐

最新文章