【www.gdgbn.com--WordPress】
wordpress thickbox 添加“查看原图”效果代码
function tb_show(caption, url, imagegroup) {//function called when the user clicks on a thickbox link
try {
/// 代码省略。。。
tb_nexthtml = "";
tb_imagecount = "";
tb_foundurl = false;
////// 打开新窗口显示原图
tb_opennewhtml = "";if(imagegroup){
/// 代码省略。。。
if (tb_foundurl) {
tb_nextcaption = tb_temparray[tb_counter].title;
tb_nexturl = tb_temparray[tb_counter].href;
tb_nexthtml = " "+thickboxl10n.next+"";
} else {
tb_prevcaption = tb_temparray[tb_counter].title;
tb_prevurl = tb_temparray[tb_counter].href;
tb_prevhtml = " "+thickboxl10n.prev+"";
}
////// 打开新窗口显示原图
tb_opennewhtml = " 查看原图";} else {
tb_foundurl = true;
tb_imagecount = thickboxl10n.image + " " + (tb_counter + 1) + " " + thickboxl10n.of + " " + (tb_temparray.length);
////// 打开新窗口显示原图
tb_opennewhtml = " 查看原图";
}
}
}
}/// 代码省略。。。
// resizing large images - orginal by christian montoya edited by me.
/// 代码省略。。。
// end resizingtb_width = imagewidth + 30;
tb_height = imageheight + 60;
//jquery("#tb_window").append("" + ""+caption+"" + tb_imagecount + tb_prevhtml + tb_nexthtml + "");
/////// 显示下一张图 + 新窗口查看原图(添加tb_opennewhtml)
jquery("#tb_window").append("" + ""+caption+"" + tb_imagecount + tb_prevhtml + tb_nexthtml + tb_opennewhtml + "");
jquery("#tb_closewindowbutton").click(tb_remove);if (!(tb_prevhtml === "")) {
/// 代码省略。。。