User:Soxra/monobook.js: Difference between revisions
From the Kingdom Hearts Wiki, the Kingdom Hearts encyclopedia
Jump to navigationJump to search
No edit summary |
(Global now!) |
||
Line 1: | Line 1: | ||
/* Recent Changes slider - requires jQuery */ | /* Recent Changes slider - requires jQuery */ | ||
$(document).ready(function() { | $(document).ready(function() { |
Revision as of 03:59, 18 January 2012
/* Recent Changes slider - requires jQuery */
$(document).ready(function() {
$(":text, input[type='text'], input[type='password'], input[type='search'], textarea, input#wpSummary").addClass("input-text-box");
$(".page-Special_RecentChanges span.mw-changeslist-expanded a, .page-Special_RecentChanges span:not(.mw-changeslist-expanded) a").live("mouseover",function() {
$(this).attr("onclick","");
}).live("click",function() {
var num = $(this).parent().attr("id").split("-")[3];
var $openarrow = $("#mw-rc-openarrow-"+num);
var $closearrow = $("#mw-rc-closearrow-"+num);
var $subentries = $("#mw-rc-subentries-"+num);
$openarrow.css("visibility","visible").removeClass("mw-changeslist-hidden mw-changeslist-expanded");
$closearrow.css("visibility","visible").removeClass("mw-changeslist-hidden mw-changeslist-expanded");
$subentries.css("visibility","visible").removeClass("mw-changeslist-expanded");
if ($subentries.is(":hidden") || $subentries.hasClass("mw-changeslist-hidden")) {
$openarrow.hide();
$closearrow.show();
$subentries.hide().removeClass("mw-changeslist-hidden").slideDown(300);
} else {
$openarrow.show();
$closearrow.hide();
$subentries.slideUp(300);
}
return false;
});
});