0
次のAJAXを使用して、投稿内容をライトボックスにプルします。すべての作品は素晴らしいですが、少し遅いです。誰も私に次のコードにローダーアイコンを追加するためのいくつかのポインタを与えることができますか?AJAX Loading Icon
ありがとうございました!
jQuery(document).ready(function ($) {
$(".getpostidlink").unbind('click');
$(".getpostidlink").mouseover(function (event) {
$(".getpostidlink").unbind('click');
var postlinkid = $(this).data("postid");
var data = {
action: 'getpostidhref_action',
security: getpostidhref.security,
postdata: postlinkid,
complete: function() {
$(".getpostidlink").unbind('click');
}
};
$.post(getpostidhref.ajaxurl, data, function (response) {
$(".getpostidlink").colorbox({
inline: true,
width: "90%",
maxWidth: 800,
open: false,
onClosed: function() {
window.location.reload();
}
})
$("div.dynamicloadcontent").replaceWith(response);
});
});
});
チェックこれはhttp://stackoverflow.com/questions/14859437/how-to-manually-make-the-colorbox-loading-gif-appearリンク、http://stackoverflow.com/questions/5412263/colorbox-show-simulate-loading-animation-for-inline-content –