MediaWiki:Common.js: Difference between revisions
Jump to navigation
Jump to search
Matt Pijoan (talk | contribs) Blanked the page |
Matt Pijoan (talk | contribs) No edit summary |
||
Line 1: | Line 1: | ||
$(document).ready(function () { | |||
$("#floatvideo").ready(function () { | |||
$(".mw-collapsible-toggle").click(function () { | |||
if ($(this).attr("class").split(' ')[1] === 'mw-collapsible-toggle-collapsed') { | |||
$(this).parent().prepend("<span class='floatvideoclose' style='float:right;'>[X]</span>"); | |||
$(".floatvideoclose").click(function () { | |||
$("#floatvideo").remove(); | |||
}); | |||
} else { | |||
$(".floatvideoclose").remove(); | |||
} | |||
}); | |||
}); | |||
}); |
Revision as of 17:53, 12 July 2017
$(document).ready(function () { $("#floatvideo").ready(function () { $(".mw-collapsible-toggle").click(function () { if ($(this).attr("class").split(' ')[1] === 'mw-collapsible-toggle-collapsed') { $(this).parent().prepend("<span class='floatvideoclose' style='float:right;'>[X]</span>"); $(".floatvideoclose").click(function () { $("#floatvideo").remove(); }); } else { $(".floatvideoclose").remove(); } }); }); });