jQuery Plugin: IrAoTopo. 08.06.12 17:43
Caros usuários,
Criei um plug-in jQuery, chamado IrAoTopo.
Código:
John Resig, Eu.
Porque eu? Bom fiquei 7 dias sem Internet, ou seja...................Tive que criar do 0, mas fiquei sabendo que já existia :OKAY:
Criei um plug-in jQuery, chamado IrAoTopo.
Código:
- Código:
<script type='text/javascript'>
/************************************************************
* jQuery Plugin : IrAoTopo
*
* Brazilian Version
*
* (c) ~~ TrY!, Power Pixel Fórum.
*
* Version: 1.34, 08.06.2012: Build: S113808062012.
*
* Visit our Website, Forum: http://www.power-pixel.net/forum
*************************************************************/
$(function(){$.fn.IrAoTopo=function(){$(this).css({'right':'5px', 'cursor':'pointer', 'bottom':'5px', 'position':'fixed'});$(this).hide().removeAttr('href');if($(window).scrollTop()!='0'){$(this).fadeIn(500)}var $this=$(this);$(window).scroll(function(){if($(window).scrollTop()=='0'){$($this).fadeOut(500)}else{$($this).fadeIn(500)}});$(this).click(function(){$('html, body').animate({scrollTop:0},500)})}});
$(function() {
$('#toTop').IrAoTopo();
});
/*******************************************************************
* A mini-Tutorial of IrAoTopo
* First put in your website the link of jQuery.
* After change a element e put the function IrAoTopo after he, example:
* $('selector').IrAoTopo(); or jQuery('selector').IrAoTopo();
* Important: If your website is a Forum, replace the '$', for the 'jQuery'.
* Um mini Tutorial do IrAoTopo
* Primeiramente coloque em seu WebSite o link da jQuery.
* Depois escolha um elemento e coloque a função IrAotopo depois dele, exemplo:
* $('seletor').IrAoTopo(); ou jQuery('seletor').IrAoTopo();
* Importante: Se o seu website for um Fórum, substitua o '$', por 'jQuery'.
*
* TrY! ~~ Power Pixel Fórum, Conteúdos Inovados para sua Diversão
* TrY! ~~ Power Pixel Fórum, Inovates Contents for your fun.
*********************************************************************/
</script>
John Resig, Eu.
Porque eu? Bom fiquei 7 dias sem Internet, ou seja...................Tive que criar do 0, mas fiquei sabendo que já existia :OKAY: