1// Disable the highlight function of pages.js
2dw_page.sectionHighlight = function () {
3    jQuery('form.btn_secedit')
4        .on('mouseover', function () {
5            let $tgt = jQuery(this).parent(),
6                nr = $tgt.attr('class').match(/(\s+|^)editbutton_(\d+)(\s+|$)/)[2];
7
8            // Walk the dom tree in reverse to find the sibling which is or contains the section edit marker
9            while ($tgt.length > 0 && !($tgt.hasClass('sectionedit' + nr) || $tgt.find('.sectionedit' + nr).length)) {
10                $tgt.addClass("strap_section_highlight");
11                $tgt = $tgt.prev();
12            }
13
14        })
15        .on('mouseout', function () {
16            let $tgt = jQuery(this).parent(),
17                nr = $tgt.attr('class').match(/(\s+|^)editbutton_(\d+)(\s+|$)/)[2];
18
19            // Walk the dom tree in reverse to find the sibling which is or contains the section edit marker
20            while ($tgt.length > 0 && !($tgt.hasClass('sectionedit' + nr) || $tgt.find('.sectionedit' + nr).length)) {
21                $tgt.removeClass("strap_section_highlight");
22                $tgt = $tgt.prev();
23            }
24        });
25};
26