MediaWiki:Biph.js
Інститут фізіології ім. О. О. Богомольця
(Difference between revisions)
(Створена сторінка: $( function(){ var canMove = true; if ( $('#mg .galleryholder').length ) { $('#mg .galleryholder a').click( function() { return false; }).css('c...) |
|||
| Line 7: | Line 7: | ||
canMove = false; | canMove = false; | ||
ul = $(this).parents('ul'); | ul = $(this).parents('ul'); | ||
| − | |||
if ( parseInt( ul.contents('li:first-child').css('marginLeft') ) != 0 ) { nl = 0; } else { | if ( parseInt( ul.contents('li:first-child').css('marginLeft') ) != 0 ) { nl = 0; } else { | ||
w = 0; | w = 0; | ||
Latest revision as of 17:23, 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');
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;});
});
};
});
