MediaWiki:Common.js/Community Choice Awards

/* Any JavaScript here will be loaded for all users on every page load. */ /****************************************/ /* sliders using jquery by User:Tierrie */ /****************************************/ mw.loader.using( ['jquery.cookie']); //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 { 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.replace("portal_sliderlink_", "")); 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; }); });

mw.loader.using( ['jquery.ui.tabs'], function { var $tabs2 = $("#portal_slider2").tabs({ fx: {opacity:'toggle', duration:100} } );  $("[class^=portal_sliderlink2]").click(function { // bind click event to link $tabs2.tabs('select', this.className.replace("portal_sliderlink2_", "")); return false; }); $('#portal_next2').click(function { $tabs2.tabs('select', ($tabs2.tabs('option', 'selected') == ($tabs2.tabs('length'))-1) ? 0 : $tabs2.tabs('option', 'selected') + 1 ); // switch to next tab return false; }); $('#portal_prev2').click(function { // bind click event to link $tabs2.tabs('select', ($tabs2.tabs('option', 'selected') == 0) ? ($tabs2.tabs('length')-1) : $tabs2.tabs('option', 'selected') - 1 ); // switch to previous tab return false; }); });

mw.loader.using( ['jquery.ui.tabs'], function { var $tabs3 = $("#portal_slider3").tabs({ fx: {opacity:'toggle', duration:100} } );  $("[class^=portal_sliderlink3]").click(function { // bind click event to link $tabs3.tabs('select', this.className.replace("portal_sliderlink3_", "")); return false; }); $('#portal_next3').click(function { $tabs3.tabs('select', ($tabs3.tabs('option', 'selected') == ($tabs3.tabs('length'))-1) ? 0 : $tabs3.tabs('option', 'selected') + 1 ); // switch to next tab return false; }); $('#portal_prev3').click(function { // bind click event to link $tabs3.tabs('select', ($tabs3.tabs('option', 'selected') == 0) ? ($tabs3.tabs('length')-1) : $tabs3.tabs('option', 'selected') - 1 ); // switch to previous tab return false; }); });

mw.loader.using( ['jquery.ui.tabs'], function { var $tabs4 = $("#portal_slider4").tabs({ fx: {opacity:'toggle', duration:100} } );  $("[class^=portal_sliderlink4]").click(function { // bind click event to link $tabs4.tabs('select', this.className.replace("portal_sliderlink4_", "")); return false; }); $('#portal_next4').click(function { $tabs4.tabs('select', ($tabs4.tabs('option', 'selected') == ($tabs4.tabs('length'))-1) ? 0 : $tabs4.tabs('option', 'selected') + 1 ); // switch to next tab return false; }); $('#portal_prev4').click(function { // bind click event to link $tabs4.tabs('select', ($tabs4.tabs('option', 'selected') == 0) ? ($tabs4.tabs('length')-1) : $tabs4.tabs('option', 'selected') - 1 ); // switch to previous tab return false; }); });

mw.loader.using( ['jquery.ui.tabs'], function { var $tabs5 = $("#portal_slider5").tabs({ fx: {opacity:'toggle', duration:100} } );  $("[class^=portal_sliderlink5]").click(function { // bind click event to link $tabs5.tabs('select', this.className.replace("portal_sliderlink5_", "")); return false; }); $('#portal_next5').click(function { $tabs5.tabs('select', ($tabs5.tabs('option', 'selected') == ($tabs5.tabs('length'))-1) ? 0 : $tabs5.tabs('option', 'selected') + 1 ); // switch to next tab return false; }); $('#portal_prev5').click(function { // bind click event to link $tabs5.tabs('select', ($tabs5.tabs('option', 'selected') == 0) ? ($tabs5.tabs('length')-1) : $tabs5.tabs('option', 'selected') - 1 ); // switch to previous tab return false; }); });

mw.loader.using( ['jquery.ui.tabs'], function { var $tabs6 = $("#portal_slider6").tabs({ fx: {opacity:'toggle', duration:100} } );  $("[class^=portal_sliderlink6]").click(function { // bind click event to link $tabs6.tabs('select', this.className.replace("portal_sliderlink6_", "")); return false; }); $('#portal_next6').click(function { $tabs6.tabs('select', ($tabs6.tabs('option', 'selected') == ($tabs6.tabs('length'))-1) ? 0 : $tabs6.tabs('option', 'selected') + 1 ); // switch to next tab return false; }); $('#portal_prev6').click(function { // bind click event to link $tabs6.tabs('select', ($tabs6.tabs('option', 'selected') == 0) ? ($tabs6.tabs('length')-1) : $tabs6.tabs('option', 'selected') - 1 ); // switch to previous tab return false; }); });

mw.loader.using( ['jquery.ui.tabs'], function { var $tabs7 = $("#portal_slider7").tabs({ fx: {opacity:'toggle', duration:100} } );  $("[class^=portal_sliderlink7]").click(function { // bind click event to link $tabs7.tabs('select', this.className.replace("portal_sliderlink7_", "")); return false; }); $('#portal_next7').click(function { $tabs7.tabs('select', ($tabs7.tabs('option', 'selected') == ($tabs7.tabs('length'))-1) ? 0 : $tabs7.tabs('option', 'selected') + 1 ); // switch to next tab return false; }); $('#portal_prev7').click(function { // bind click event to link $tabs7.tabs('select', ($tabs7.tabs('option', 'selected') == 0) ? ($tabs7.tabs('length')-1) : $tabs7.tabs('option', 'selected') - 1 ); // switch to previous tab return false; }); });

mw.loader.using( ['jquery.ui.tabs'], function { var $tabs8 = $("#portal_slider8").tabs({ fx: {opacity:'toggle', duration:100} } );  $("[class^=portal_sliderlink8]").click(function { // bind click event to link $tabs8.tabs('select', this.className.replace("portal_sliderlink8_", "")); return false; }); $('#portal_next8').click(function { $tabs8.tabs('select', ($tabs8.tabs('option', 'selected') == ($tabs8.tabs('length'))-1) ? 0 : $tabs8.tabs('option', 'selected') + 1 ); // switch to next tab return false; }); $('#portal_prev8').click(function { // bind click event to link $tabs8.tabs('select', ($tabs8.tabs('option', 'selected') == 0) ? ($tabs8.tabs('length')-1) : $tabs8.tabs('option', 'selected') - 1 ); // switch to previous tab return false; }); });

mw.loader.using( ['jquery.ui.tabs'], function { var $tabs9 = $("#portal_slider9").tabs({ fx: {opacity:'toggle', duration:100} } );  $("[class^=portal_sliderlink9]").click(function { // bind click event to link $tabs9.tabs('select', this.className.replace("portal_sliderlink9_", "")); return false; }); $('#portal_next9').click(function { $tabs9.tabs('select', ($tabs9.tabs('option', 'selected') == ($tabs9.tabs('length'))-1) ? 0 : $tabs9.tabs('option', 'selected') + 1 ); // switch to next tab return false; }); $('#portal_prev9').click(function { // bind click event to link $tabs9.tabs('select', ($tabs9.tabs('option', 'selected') == 0) ? ($tabs9.tabs('length')-1) : $tabs9.tabs('option', 'selected') - 1 ); // switch to previous tab return false; }); });

mw.loader.using( ['jquery.ui.tabs'], function { var $tabs10 = $("#portal_slider10").tabs({ fx: {opacity:'toggle', duration:100} } );  $("[class^=portal_sliderlink10]").click(function { // bind click event to link $tabs10.tabs('select', this.className.replace("portal_sliderlink10_", "")); return false; }); $('#portal_next10').click(function { $tabs10.tabs('select', ($tabs10.tabs('option', 'selected') == ($tabs10.tabs('length'))-1) ? 0 : $tabs10.tabs('option', 'selected') + 1 ); // switch to next tab return false; }); $('#portal_prev10').click(function { // bind click event to link $tabs10.tabs('select', ($tabs10.tabs('option', 'selected') == 0) ? ($tabs10.tabs('length')-1) : $tabs10.tabs('option', 'selected') - 1 ); // switch to previous tab return false; }); });