From 703b77cb77fa5a99b91cf95220d779bba9ac96d6 Mon Sep 17 00:00:00 2001 From: Marc Alexander Date: Sun, 16 Dec 2012 01:06:32 +0100 Subject: [PATCH] [ticket/10954] Use quotes in attribute selectors and reduce use of each PHPBB3-10954 --- phpBB/styles/prosilver/template/ajax.js | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/phpBB/styles/prosilver/template/ajax.js b/phpBB/styles/prosilver/template/ajax.js index 4e52884a29..41764d5d72 100644 --- a/phpBB/styles/prosilver/template/ajax.js +++ b/phpBB/styles/prosilver/template/ajax.js @@ -29,13 +29,11 @@ phpbb.add_ajax_callback('mark_forums_read', function(res) { $this.removeClass(unreadClass).addClass(readClass); } }); - $this.children('dt[title=' + unreadTitle + ']').attr('title', readTitle); + $this.children('dt[title="' + unreadTitle + '"]').attr('title', readTitle); }); // Update mark forums read links - $('[data-ajax=mark_forums_read]').each(function() { - $(this).attr('href', res.U_MARK_FORUMS); - }); + $('[data-ajax="mark_forums_read"]').attr('href', res.U_MARK_FORUMS); phpbb.closeDarkenWrapper(); }); @@ -78,18 +76,14 @@ phpbb.add_ajax_callback('mark_topics_read', function(res) { $this.removeClass(unreadClass).addClass(readClass); } }); - $this.children('dt[title=' + unreadTitle + ']').attr('title', readTitle); + $this.children('dt[title="' + unreadTitle + '"]').attr('title', readTitle); }); // Remove link to first unread post - $('span.icon_topic_newest').each(function() { - $(this).remove(); - }); + $('span.icon_topic_newest').remove(); // Update mark topics read links - $('[data-ajax=mark_topics_read]').each(function() { - $(this).attr('href', res.U_MARK_TOPICS); - }); + $('[data-ajax="mark_topics_read"]').attr('href', res.U_MARK_TOPICS); phpbb.closeDarkenWrapper(); });