Generate preview on img clicked only

This commit is contained in:
gplane 2017-04-21 00:18:51 +08:00
parent 6e5ed604cd
commit f2b51fbd2a

View File

@ -20,11 +20,11 @@ $('body').on('click', '#preview-switch', () => {
var selected = [];
$('body').on('click', '.item', function () {
$('.item-selected').removeClass('item-selected');
$(this).addClass('item-selected');
$('body').on('click', '.item-body', function () {
$('.item-selected').parent().removeClass('item-selected');
$(this).parent().addClass('item-selected');
let tid = $(this).attr('tid');
let tid = $(this).parent().attr('tid');
$.ajax({
type: "POST",