增加动态演示图

This commit is contained in:
click33
2022-05-09 17:35:29 +08:00
parent af2d851ddb
commit 0975070508
12 changed files with 70 additions and 5 deletions

View File

@@ -81,6 +81,20 @@ var myDocsifyPlugin = function(hook, vm) {
// $('.search input').val('');
$('.results-panel').removeClass('show');
});
// 点击按钮,加载图片
$(document).on('click', '.show-img', function(){
var src = $(this).attr('img-src');
var img = '<img class="show-to-img" src="' + src + '" />';
$(this).after(img);
$(this).remove();
})
// 点击按钮,加载图片
$(document).on('click', '.show-to-img', function(){
open(this.src);
})
});
}