MediaWiki:Biph.js

(Difference between revisions)
Jump to: navigation, search
Baya (Talk | contribs)
(Створена сторінка: $( function(){ var canMove = true; if ( $('#mg .galleryholder').length ) { $('#mg .galleryholder a').click( function() { return false; }).css('c...)
Newer edit →

Revision as of 18:11, 31 March 2012

$( function(){
    var canMove = true;
    if ( $('#mg .galleryholder').length ) {
        $('#mg .galleryholder a').click( function() { return false; }).css('cursor','default');
        $('#mg .galleryholder a').mouseleave( function() { canMove = true; }).mouseenter( function() {
            if ( !canMove ) return;
            canMove = false;
            ul = $(this).parents('ul');
            document.title = ul.contents('li:first-child').css('marginLeft');
            if ( parseInt( ul.contents('li:first-child').css('marginLeft') ) != 0 ) { nl = 0; } else {
                w = 0;
                ul.contents('li').each( function() { w+= $(this).width() + 3 } );
                nl = ul.width() - w;
            }
            ul.contents('li:first-child').animate({'marginLeft':nl + 'px'},5000,function(){canMove = true;});
        });
    };
});
Personal tools
Navigation
societies
additional
Views
Namespaces
Variants
Toolbox
Actions