Widget:indexSorterGrouper: Difference between revisions
Jump to navigation
Jump to search
m First element, too |
Removing paragraph so it's stable as before |
||
Line 2: | Line 2: | ||
RLQ.push(['jquery', function () { | RLQ.push(['jquery', function () { | ||
$(document).ready(function() { | $(document).ready(function() { | ||
// initially remove the paragraph | |||
var parents = $(".mw-headline").closest("h2"); | |||
parents.each(function() { | |||
var parent = $(this); | |||
var paragraph = parent.next('p'); | |||
paragraph.replaceWith(paragraph.children()); | |||
}); | |||
// For now, we have to make sure the data is there (Change the template, dammit!) | // For now, we have to make sure the data is there (Change the template, dammit!) | ||
$(".card-bg-small").each(function() { | $(".card-bg-small").each(function() { | ||
Line 296: | Line 304: | ||
var parent = $(this); | var parent = $(this); | ||
// All elements inside the paragraph after the h2 which have special class | // All elements inside the paragraph after the h2 which have special class | ||
var | var elements = parent.nextUntil("h2", ".card-bg-small"); | ||
elements.detach().sort(comparer); | elements.detach().sort(comparer); |
Revision as of 18:41, 10 November 2019
Released on this server: