Template:User sandbox+/hoverhighlight.js

This is the current revision of this page, as edited by imported>Mr. Stradivarius at 15:06, 4 December 2021 (Protected "Template:User sandbox+/hoverhighlight.js": used in user scripts; should not be openly editable ([Edit=Require administrator access] (indefinite) [Move=Require administrator access] (indefinite))). The present address (URL) is a permanent link to this version.

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
$('.hover-bgc').hover( function() {
    $(this).attr("data-hover-bgc-original", $(this).css("background-color"));
    var parentSpec = $(this).parent('.hover-bgc-parent').attr('data-hover-bgc-child');
    var newColor = ((typeof parentSpec !== typeof undefined) && (parentSpec !== false)) ? parentSpec : $(this).attr('data-hover-bgc');
    $(this).css({ "background-color" : newColor});
}, function() {
    $(this).css({ "background-color" : $(this).attr('data-hover-bgc-original') });
});