Load Image On Click With AJAX (jQuery)

后端 未结 2 1690
攒了一身酷
攒了一身酷 2021-01-24 13:13

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

2条回答
  •  夕颜
    夕颜 (楼主)
    2021-01-24 13:15

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

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

提交回复
热议问题