Deze vticker werkt niet? Mischien zien jullie het?
Url waar het wel werkt: http://www.jugbit.com/jquery/vticker.php



<script type="text/javascript" src="jquery.js"></script> 
<script type="text/javascript" src="jquery.vticker-min.js"></script> 
<script type="text/javascript"> 
$(function(){
	$('#navigation').vTicker({ 
		speed: 500,
		pause: 3000,
		animation: 'fade',
		mousePause: false,
		showItems: 3
	});
});
</script> 
</head>

<body>

   <!-- Begin Wrapper -->
   <div id="wrapper">
   
         <!-- Begin Header -->
         <div id="header">
		 
		       
			   
		 </div>
		 <!-- End Header -->
		 
		 <!-- Begin Navigation -->
         <div id="navigation">
		 
		       <ul>
				<li><div>Er is op dit moment 5400 kilo verloren door 400 nederlanders.</div></li>
				<li><div>Er zijn op dit moment 3000 mensen online.</div></li>
				<li><div>Het recept van de week is spinazie al le buffle.</div></li>
			   </ul>
   </div>
   <!-- End Wrapper -->
   
</body>
</html>
			   
Gokje, de JS-files zijn niet geupload, of het pad klopt niet?
Nou dat is het juist, als ik in de brondcode kijk en dan is er een link zeg maar.
Als ik op de link klik opent hij de file gewoon?
Geeft firebug een melding? Of kan je het ergens online zetten, want het is nu gokken?
Je hebt er maar 3 items in staan. De ticker zal wel niet worden geactiveerd omdat het niet nodig is.
Weet nog steeds niet wat he probleem is. Heb het opgelost door middel van de directe bron te gebruiken.

In ieder geval bedankt
Verander

showItems: 3

eens in

showItems: 2

op regel 10.

of dump wat meer items in je navigation menu.
Heb nu al meer dan 3 items, maar het werkt niet. Als ik de link van de bron gebruik wel?

code Vticker:

/*
* vertical news ticker
* Tadas Juozapaitis ( [email protected] )
* http://www.jugbit.com/jquery-vticker-vertical-news-ticker/
*/
(function($){
$.fn.vTicker = function(options) {
	var defaults = {
		speed: 700,
		pause: 4000,
		showItems: 1,
		animation: '',
		mousePause: true,
		isPaused: false,
		direction: 'up',
		height: 0
	};

	var options = $.extend(defaults, options);

	moveUp = function(obj2, height, options){
		if(options.isPaused)
			return;
		
		var obj = obj2.children('ul');
		
    	var clone = obj.children('li:first').clone(true);
		
		if(options.height > 0)
		{
			height = obj.children('li:first').height();
		}		
		
    	obj.animate({top: '-=' + height + 'px'}, options.speed, function() {
        	$(this).children('li:first').remove();
        	$(this).css('top', '0px');
        });
		
		if(options.animation == 'fade')
		{
			obj.children('li:first').fadeOut(options.speed);
			if(options.height == 0)
			{
			obj.children('li:eq(' + options.showItems + ')').hide().fadeIn(options.speed).show();
			}
		}

    	clone.appendTo(obj);
	};
	
	moveDown = function(obj2, height, options){
		if(options.isPaused)
			return;
		
		var obj = obj2.children('ul');
		
    	var clone = obj.children('li:last').clone(true);
		
		if(options.height > 0)
		{
			height = obj.children('li:first').height();
		}
		
		obj.css('top', '-' + height + 'px')
			.prepend(clone);
			
    	obj.animate({top: 0}, options.speed, function() {
        	$(this).children('li:last').remove();
        });
		
		if(options.animation == 'fade')
		{
			if(options.height == 0)
			{
				obj.children('li:eq(' + options.showItems + ')').fadeOut(options.speed);
			}
			obj.children('li:first').hide().fadeIn(options.speed).show();
		}
	};
	
	return this.each(function() {
		var obj = $(this);
		var maxHeight = 0;

		obj.css({overflow: 'hidden', position: 'relative'})
			.children('ul').css({position: 'absolute', margin: 0, padding: 0})
			.children('li').css({margin: 0, padding: 0});

		if(options.height == 0)
		{
			obj.children('ul').children('li').each(function(){
				if($(this).height() > maxHeight)
				{
					maxHeight = $(this).height();
				}
			});

			obj.children('ul').children('li').each(function(){
				$(this).height(maxHeight);
			});

			obj.height(maxHeight * options.showItems);
		}
		else
		{
			obj.height(options.height);
		}
		
    	var interval = setInterval(function(){ 
			if(options.direction == 'up')
			{ 
				moveUp(obj, maxHeight, options); 
			}
			else
			{ 
				moveDown(obj, maxHeight, options); 
			} 
		}, options.pause);
		
		if(options.mousePause)
		{
			obj.bind("mouseenter",function(){
				options.isPaused = true;
			}).bind("mouseleave",function(){
				options.isPaused = false;
			});
		}
	});
};
})(jQuery);
Heb je geen werkend voorbeeld?
De link in mijn eerste post bevat een werkend voorbeeld.



BTW, Wat vinden jullie hier van? Klikje.
Wat moet ik nog allemaal veranderen?
Ik doelde op een voorbeeld die niet werkt... :-)
Kunnen we die bekijken?

Reageren