Skip to content

Node.js based forum software built for the modern web

fix: attribute name so it works for both templates

Barış Soner Uşaklıebb32e789167
diff --git a/public/src/modules/categorySearch.js b/public/src/modules/categorySearch.js
index d5a61b3dc7..0a8b7a3f3a 100644
--- a/public/src/modules/categorySearch.js
+++ b/public/src/modules/categorySearch.js
@@ -14,7 +14,7 @@ define('categorySearch', function () {
var categoryEls = el.find('[component="category/list"] [data-cid]');
el.on('show.bs.dropdown', function () {
function revealParents(cid) {
- var parentCid = el.find('[component="category/list"] [data-cid="' + cid + '"]').attr('data-parentCid');
+ var parentCid = el.find('[component="category/list"] [data-cid="' + cid + '"]').attr('data-parent-cid');
if (parentCid) {
el.find('[component="category/list"] [data-cid="' + parentCid + '"]').removeClass('hidden');
revealParents(parentCid);
@@ -22,7 +22,7 @@ define('categorySearch', function () {
}
function revealChildren(cid) {
- var els = el.find('[component="category/list"] [data-parentCid="' + cid + '"]');
+ var els = el.find('[component="category/list"] [data-parent-cid="' + cid + '"]');
els.each(function (index, el) {
var $el = $(el);
$el.removeClass('hidden');