Mabinogi World Wiki is brought to you by Coty C., 808idiotz, our other patrons, and contributors like you!!
Want to make the wiki better? Contribute towards getting larger projects done on our Patreon!

MediaWiki talk:Common.js

From Mabinogi World Wiki

Contents

Thread titleRepliesLast modified
Revenge!623:02, 4 December 2010

Add

addOnloadHook(function() {
	$j('.tabdiv > div').hide();
	$j('.tabdiv').each(function() {
		$j(this).find('> ul li:first').addClass('active');
		$j(this).find('> div:first').show();
	});
 	$j('.tabdiv > ul li').each(function() {
		var a = $j(this).find('a:first');
		var target = a.attr('href');
		$j(a).attr('href', ''); // Opera hates real hrefs
		$j(this).click(function() {
			$j(this).parent().find('> li').removeClass('active');
			$j(this).parent().parent().find('> div').hide();
			$j(this).addClass('active');
			$j(target).show();
			return false;
		});
	});
});

Please and Thank You~

κєνıи тαıĸ«)02:11, 4 December 2010

Add

$j=jQuery.noConflict();

Right after

addOnloadHook(function() {

Please~

κєνıи тαıĸ«)18:05, 4 December 2010
 

Uhmm... That won't work since we don't have jQuery... I wouldn't recommend it since jQuery is like 1.2MB and has to be downloaded by the end-user from this server

~Д TALKCONTRIBS 18:41, 4 December 2010 (PST)

<span id="mouseover-custom-anch
18:41, 4 December 2010
 

Yeah. I figured that out a while later. but 1.2mb? Doesn't seem like much. :c

κєνıи тαıĸ«)18:42, 4 December 2010
 

That adds up to a lot since we have millions of users visiting this wiki? (Maybe that is a bit exaggerated, but...) That means more bandwidth and data used by the server and that means that the wiki will be slower to load and IJ has to pay more money for the internet connection.

~Д TALKCONTRIBS 19:02, 4 December 2010 (PST)

<span id="mouseover-custom-anch
19:02, 4 December 2010

How come this wiki doesn't have jQuery as 1.24mb? It says 0! D:

κєνıи тαıĸ«)19:06, 4 December 2010
 

Interesting... They seem to have "compressed" it into 25KBs... But that still is quite a lot. I could do it without jQuery. jQuery is for lazy peeps Xp

~Д TALKCONTRIBS 23:02, 4 December 2010 (PST)

<span id="mouseover-custom-anch
23:02, 4 December 2010