terkin
Мой дом здесь!
- Регистрация
- 9 Дек 2006
- Сообщения
- 513
- Реакции
- 200
- Автор темы
- #1
Сейчас прокрутка списка в скрипте у меня идёт при нажатии на кнопку, реализовано это так
	
	
	
		
Мне нужно что бы при наведении курсора на кнопку список у меня прокручивался пока не будет убран курсор с кнопки: если click заменить на mouseover тогда прокрутка срабатывает на один цикл всего.
Функция scrollContent
	
	
	
		
	
		
			
		
		
	
				
			
		PHP:
	
			jQuery('div.ifM_pager a', this)
				.bind(
					'click',
					function ()
					{
						var scroll = 'Down';
						if(jQuery(this).attr('rel')!='Down')
							scroll = 'Up';
						jQuery.ifastFind.scrollContent(0,scroll);
						return false;
					}
				);Функция scrollContent
		PHP:
	
		scrollContent : function (e,d)
	{
		// Get Tile Count (Since moving left deletes tiles
		// to right, this is always the current tile)
		jQuery.ifastFind.countTiles();
		// Define Pointer to the Parent Container
		var pop = jQuery('#ifM_tile'+jQuery.ifastFind.tileCount);
		// Define Pointer to the Container that holds the link (scroll area)
		var box = jQuery(pop).children('.ifM_content');
		var bit = new Array();
		var ctr = 0; var top = 0; var lim = 8;	// 8 Per Page
		var amt = jQuery(box).children('a').length;
		// Define Pointer to All the Links (Needed to Make Sure Scroll is aligned)
		jQuery(box).children('a').each(
			function ()
			{
				bit[ctr] = this;
				if(jQuery(this).attr('rel')=='first')
					top = ctr;
				ctr++;
			}
		);
		// Move Links
		if(d == 'Up') top--; else top++;
		// Grab Pager Pointer
		var pgr = jQuery(pop).children('.ifM_pager');
		// Make Sure In Bounds
		if(top < 1)
		{
			top = 0;
			jQuery(pgr).children('a').each(function(){if(jQuery(this).attr('rel')=='Up')jQuery(this).hide();});
		}
		else { jQuery(pgr).children('a').each(function(){if(jQuery(this).attr('rel')=='Up')jQuery(this).show();}); }
		if(top >= amt - lim)
		{
			top = amt - lim;
			jQuery(pgr).children('a').each(function(){if(jQuery(this).attr('rel')=='Down')jQuery(this).hide();});
		}
		else { jQuery(pgr).children('a').each(function(){if(jQuery(this).attr('rel')=='Down')jQuery(this).show();}); }
		//alert('Top: '+top+', Lim: '+lim+', Amt: '+amt);
		// Toggle Display
		for(i=0;i<amt;i++)
		{
			if(i==top)
				jQuery(bit[i]).attr('rel','first');
			else
				jQuery(bit[i]).attr('rel','');
			if(i>=top && i<=top+lim)
				jQuery(bit[i]).css('display','block');
			else
				jQuery(bit[i]).css('display','none');
		}
	}, 
				