开发者

start to load on click()

开发者 https://www.devze.com 2022-12-18 05:15 出处:网络
i want some con开发者_StackOverflow中文版tent to start loading when i click on a link. i dont want it to use any bandwidth before i click on that link. also how to implement that rotating cursor anima

i want some con开发者_StackOverflow中文版tent to start loading when i click on a link. i dont want it to use any bandwidth before i click on that link. also how to implement that rotating cursor animation that is seen in almost all lightboxes?


Use the $.ajax() function to load content dynamically.

For the animation, find an animated .gif (http://www.ajaxload.info can generate one for you). What I usually do is:

$(element).html('<img src="loading.gif">');

Then run your ajax function, and on success replace the loading gif with the loaded content.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号