MediaWiki:Common.js

/* Any JavaScript here will be loaded for all users on every page load. */

$(document).ready(function {   $(".linkhover").hover(function { $(".imagehover").css("display","table"); },function { $(".imagehover").css("display","none"); }); });

//================================ //         jQuery Slider //================================ // Code from http://dragonage.wikia.com/wiki/MediaWiki:Common.js created by "Tierrie" // see also http://onepiece.wikia.com/wiki/MediaWiki:Common.js/slider.js mw.loader.using(["jquery.cookie"]); mw.loader.using(["jquery.ui.tabs"], function { $(".portal_vtab").tabs.addClass("ui-tabs-vertical ui-helper-clearfix");  $(".portal_vtab > ul > li").removeClass("ui-corner-top").addClass("ui-corner-left");  var $tabs = $("#portal_slider").tabs({ fx: { opacity: "toggle", duration: 100 } });  $(".portal_sliderlink").click(function { // binding click event $tabs.tabs("select", this.className.match(/portal_sliderlink-(\d+)/)[1]); return false; }); $(".portal_next").click(function { // binding click event var selected = $tabs.tabs("option", "selected"); $tabs.tabs("select", selected + 1); // switch to next tab return false; }); $(".portal_prev").click(function { // binding click event var selected = $tabs.tabs("option", "selected"); $tabs.tabs("select", selected - 1); // switch to previous tab return false; }); });

/****************************************/ /* sliders using jquery by User:Tierrie */ /****************************************/ mw.loader.using( ['jquery.cookie']); /****************************************/ /* sliders using jquery by User:Tierrie */ /****************************************/ //wsl.loadScript("http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js"); //wsl.loadScript("http://dragonage.wikia.com/index.php?title=MediaWiki:Jquery-ui.min.js&action=raw&ctype=text/javascript"); mw.loader.using( ['jquery.ui.tabs'], function { $( "[class^=portal_vtab]" ).tabs.addClass( "ui-tabs-vertical ui-helper-clearfix" );  $( "[class^=portal_vtab] li" ).removeClass( "ui-corner-top" ).addClass( "ui-corner-left" );  var $tabs = $("#portal_slider").tabs({ fx: {opacity:'toggle', duration:100} } );  $("[class*=portal_sliderlink]").click(function { // bind click event to link $tabs.tabs('select', this.className.match(/portal_sliderlink-(\d+)/)[1]); console.log("Sliding to " + this.className.match(/portal_sliderlink-(\d+)/)[1]); return false; }); $('#portal_next').click(function { $tabs.tabs('select', ($tabs.tabs('option', 'selected') == ($tabs.tabs('length'))-1) ? 0 : $tabs.tabs('option', 'selected') + 1 ); // switch to next tab return false; }); $('#portal_prev').click(function { // bind click event to link $tabs.tabs('select', ($tabs.tabs('option', 'selected') == 0) ? ($tabs.tabs('length')-1) : $tabs.tabs('option', 'selected') - 1 ); // switch to previous tab return false; }); });

importScriptPage('Tooltips/code.js', 'dev');