From 64d6beb13e27db6cbd4baf795fe71e3a98bb73ba Mon Sep 17 00:00:00 2001 From: plegall Date: Tue, 1 Dec 2015 13:50:28 +0100 Subject: improved use of jQuery, by @mistic100 --- admin/themes/default/template/cat_modify.tpl | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/admin/themes/default/template/cat_modify.tpl b/admin/themes/default/template/cat_modify.tpl index af1fb5792..013cf9553 100644 --- a/admin/themes/default/template/cat_modify.tpl +++ b/admin/themes/default/template/cat_modify.tpl @@ -43,9 +43,11 @@ jQuery(document).ready(function() { success:function(data) { var data = jQuery.parseJSON(data); if (data.stat == 'ok') { - jQuery(".albumThumbnailImage").attr('href', data.result.url); - jQuery(".albumThumbnailImage img").attr('src', data.result.src); - jQuery(".albumThumbnailImage").show(); + jQuery(".albumThumbnailImage") + .attr('href', data.result.url) + .find("img").attr('src', data.result.src) + .end().show(); + jQuery(".albumThumbnailRandom").hide(); } else { -- cgit v1.2.3