MediaWiki:Common.js: Difference between revisions
mNo edit summary |
mNo edit summary |
||
| Line 2: | Line 2: | ||
/* Expand/Collapse all for FAQList */ | /* Expand/Collapse all for FAQList */ | ||
mw.hook('wikipage.content').add(function($content) { | mw.hook('wikipage.content').add(function ($content) { | ||
// Expand all | |||
$ | $content.on('click', '.faq-expand-all', function () { | ||
$('.faq-list details').attr('open', true); | |||
}); | }); | ||
// Collapse all | |||
$ | $content.on('click', '.faq-collapse-all', function () { | ||
$('.faq-list details').removeAttr('open'); | |||
}); | }); | ||
}); | }); | ||