User:Soxra/monobook.js: Difference between revisions

From the Kingdom Hearts Wiki, the Kingdom Hearts encyclopedia
Jump to navigationJump to search
(Kay, legit srs, that code is way more than we need, lol.)
mNo edit summary
Line 22: Line 22:
var id = $(this).attr("id");
var id = $(this).attr("id");
id = id.substr(0, id.length - 4);
id = id.substr(0, id.length - 4);
$container.find("div.morphContent").hide();
$container.find(".morphContent").hide();
$container.find("div#"+id+"Content").show();
$container.find("#"+id+"Content").show();
});
});
});
});
});
});

Revision as of 04:26, 3 July 2012

$(document).ready(function () {
    /* Force input boxes to have input box class */
    $(":text, input[type='text'], input[type='password'], input[type='search'], textarea, input#wpSummary").addClass("input-text-box");

    /* Improvement Box Tabber */
    $(".improvementBox").find(".improveTabLinkBox a").click(function () {
        $(".improvementBox").find("#improveTabs > div").hide();
        $(".improvementBox").find("#improveTabs > div" + $(this).attr("href")).show();
        return false;
    });
});

/* ***************************************** */

$(document).ready(function() {
	$(".morphMaster").each(function() {
		var $master = $(this);
		var $tabs = $master.find(".morphTabBox");
		var $container = $master.find(".morphTabContainer");
		
		$tabs.find(".morphLink").click(function() {
			var id = $(this).attr("id");
			id = id.substr(0, id.length - 4);
			$container.find(".morphContent").hide();
			$container.find("#"+id+"Content").show();
		});
	});
});