Skip to content

Node.js based forum software built for the modern web

fix: #11619, fix selector

Barış Soner Uşaklıcdeaef6b7cd9
diff --git a/public/src/modules/notifications.js b/public/src/modules/notifications.js
index e0679b8e1b..b749c2e068 100644
--- a/public/src/modules/notifications.js
+++ b/public/src/modules/notifications.js
@@ -74,11 +74,11 @@ define('notifications', [
Notifications.handleUnreadButton = function (notifList) {
notifList.on('click', '.mark-read', function () {
const $this = $(this);
- const liEl = $this.parents('li[data-nid]');
- const unread = liEl.hasClass('unread');
- const nid = liEl.attr('data-nid');
+ const notifEl = $this.parents('[data-nid]');
+ const unread = notifEl.hasClass('unread');
+ const nid = notifEl.attr('data-nid');
markNotification(nid, unread, function () {
- liEl.toggleClass('unread');
+ notifEl.toggleClass('unread');
$this.find('.unread').toggleClass('hidden', unread);
$this.find('.read').toggleClass('hidden', !unread);
});