MediaWiki:Common.js: Difference between revisions

no edit summary
(Undo revision 247434 by Kenny (talk))
No edit summary
Line 6: Line 6:
  })();
  })();
/*
/*
$(function(){
addOnloadHook(function(){
     $('div.tabdiv > ul > li').click(function(){
     $('div.tabdiv > ul > li').click(function(){
         var list_parent = $(this).parent();
         $(this).parent().parent().children('div').hide();
        var root = $(list_parent).parent();
         $((this).children('a:first').attr('href')).show();
        var target = root.children('div:eq(' + list_parent.index(this) + ')');
         $(this).parent().children('li').removeClass('active').addClass('inactive');
 
         $(this).removeClass('inactive').addClass('active');
         list_parent.children('li.active').removeClass('active');
         root.children('div.active').removeClass('active');
 
        $(target).addClass('active');
         $(this).addClass('active');
     });
     });
     $('div.tabdiv > ul > li > a:first').each(function(){
     $('div.tabdiv > ul > li > a:first').each(function(){
Line 22: Line 17:
     });
     });
});
});
/*
*/
$(function($) {
 
addOnloadHook(function($) {
return function() {
return function() {
$('.tabdiv > div').hide();
$('.tabdiv > div').hide();
Line 50: Line 46:


/****************************** Slides JS ******************************/
/****************************** Slides JS ******************************/
$(function(){
addOnloadHook(function(){
     $('.slidediv').each(function(){
     $('.slidediv').each(function(){
         var width = $(this).width();
         var width = $(this).width();
Line 69: Line 65:


/* Add a hook to make buttons, where need be, on every pageload */
/* Add a hook to make buttons, where need be, on every pageload */
$( createTableButtons );
addOnloadHook( createTableButtons );


/* Define global variables:
/* Define global variables:
Line 397: Line 393:
}
}


$( doRoundEdges );
addOnloadHook( doRoundEdges );




Line 430: Line 426:


/* Add a hook to perform code on every pageload */
/* Add a hook to perform code on every pageload */
$( performIE );
addOnloadHook( performIE );
function performIE()
function performIE()
{  
{  
Line 486: Line 482:
     console.log(headerList);
     console.log(headerList);
     headerList.each(function(){
     headerList.each(function(){
         $(this).css('-webkit-background-mask-image', 'linear-gradient(to bottom, #000, #fff, #000)');
         var bgc = $(this).css('background-color');
        $(this).css('background-image', 'linear-gradient(to bottom, #eee, ' + bgc + ')');
     });
     });
     rainbowList.css({
     rainbowList.css({
         'backgroundColor': 'rainbow'
         'backgroundColor': 'orange'
     });
     });
});
});
25,204

edits