Ir para conteúdo

POWERED BY:

Arquivado

Este tópico foi arquivado e está fechado para novas respostas.

DeaDKenshiN

JQuery

Recommended Posts

Boas Galera... Preciso de uma mãozinha no seguinte...

 

Existe um Scroller muito interessante, que pode ser visto no link: Vertical Scroll. Mas o problema é o seguinte, eu preciso que ele faça igualzinho está aí, porém para baixo(pode parecer frescura, mas chefe é chefe). Meus conhecimentos vagos em Javascript e JQuery me impossibilitam de fazer isso...

 

Alguém pode me dar uma mão? http://forum.imasters.com.br/public/style_emoticons/default/thumbsup.gif

 

Abraços

Compartilhar este post


Link para o post
Compartilhar em outros sites

Não não... É o seguinte, esse é perfeito para o que estou precisando, porém eu preciso de 2 desses, um para cara direção, um subindo e um descendo, dando loop... Entendeu? E procurei bastante não consegui achar nada similar ao que preciso...

 

 

Obrigado

Compartilhar este post


Link para o post
Compartilhar em outros sites

E tp... eu preciso dele verticalmente... Tp... não ta muito dificil mexer no codigo desse que eu passei, mas eu n sei nada de JQuery, eu dei uma mexida e consegui fazer algumas mudanças... Mas não consegui fazer funcionar... Alguem que tem um pouco de conhecimento em JQuery deve conseguir fazer sem problemas...

 

É igualzinho aquele q mande, só que na direção contraria... É só baixar o codigo e tentar alterar... :)

 

Vlw... Abraços

Compartilhar este post


Link para o post
Compartilhar em outros sites

Trago-vos o código usado nesse script, para facilitar visualização:

 

// Create a self-invoking anonymous function. That way, 
// we're free to use the jQuery dollar symbol anywhere within.
(function($) {

// We name our plugin "newscroll". When creating our function, 
// we'll allow the user to pass in a couple of parameters.
$.fn.newsScroll = function(options) {
	
	// For each item in the wrapped set, perform the following. 
	return this.each(function() {	
	  
		var
		  // Caches this - or the ul widget(s) that was passed in.
		  //  Saves time and improves performance.
		  $this = $(this), 
		  
		  // If the user doesn't pass in parameters, we'll use this object. 
		  defaults = {
			  speed: 400, // How quickly should the items scroll?
			  delay: 3000, // How long a rest between transitions?
			  list_item_height: $this.children('li').outerHeight() // How tall is each list item? If this parameter isn't passed in, jQuery will grab it.
		 },
		  // Create a new object that merges the defaults and the 
		  // user's "options".  The latter takes precedence.
		  settings = $.extend({}, defaults, options);
		 
	  // This sets an interval that will be called continuously.
	  setInterval(function() {
			  // Get the very first list item in the wrapped set.
			  $this.children('li:first')
					  // Animate it
					  .animate({ 
						  marginTop : '-' + settings.list_item_height, // Shift this first item upwards.
						 opacity: 'hide' }, // Fade the li out.
						 
						 // Over the course of however long is 
						 // passed in. (settings.speed)
						 settings.speed, 
						 
						 // When complete, run a callback function.
						 function() {
						 	
						 	// Get that first list item again. 
		   					$this.children('li:first')
		   						 .appendTo($this) // Move it the very bottom of the ul.
		   						 
		   						 // Reset its margin top back to 0. Otherwise, 
		   						 // it will still contain the negative value that we set earlier.
		   						 .css('marginTop', 0) 
		   						 .fadeIn(300); // Fade in back in.
		   			  }
 	 			  ); // end animate
 	  }, settings.delay); // end setInterval
	  });
}

})(jQuery);

Compartilhar este post


Link para o post
Compartilhar em outros sites

se você acha facil entao pk nao pensa?

 

 

hehe

 

 

 

brinkadeira entao o segredo esta nesta linha

 

.css('marginTop', 0)

isto significa que o elemento a cada iterracao fica com margin do top 0

 

 

so tem de substrituir o codigo por isto

 

 

.css('marginLeft', 0)

 

espero ter ajudado

Compartilhar este post


Link para o post
Compartilhar em outros sites

É... não resolveu!! =(

 

É... eu creio que seja facil pra quem tem uma noção no assunto... Como não tenho... Pra mim não é facil não!! eiuhiehiehiueh

 

 

vlw

Compartilhar este post


Link para o post
Compartilhar em outros sites

×

Informação importante

Ao usar o fórum, você concorda com nossos Termos e condições.