SP-Design

Seja bem-vindo ao SP-Design. Aqui, lhe ajudaremos com o tema de seu Fórum/Blog/site, vocês poderão solicitar e fornecer ajuda a outros usuários sobre o design e estrutura, tanto grafica, tanto em css e templantes.


Regulamento e informações:      
Equipe SP-Design
Regras do fórum
Como entrar na equipe Staff
Seções do fórum:
Pedidos Graficos
Pedidos de Códigos
SP-Design e você
Antes de postar uma dúvida:
Função busca
Perguntas e respostas frequêntes
Tutoriais, dicas e astúcias
Feliz ano novo para você!
Leia a carta de boas festas da equipe SPD.
Área Vip, os códigos mais inovadores
Obtenha os códigos mais inovadores de nosso fórum, atraves de pontos de Cash.
Leia as Regras do SP-Design
Acabou de chegar? Para se "enturmar" rapidamente leia as regras desse fórum.
Tutoriais e Dicas
Veja aqui nossos tutoriais inéditos, e muitos outros tutoriais sobre Design.
Publique no SPublicidade
Publique, peça opinião de pessoas experientes, divulgue o seu trabalho com o SPublicidade
Modifique o visual do seu fórum
Dúvidas sobre códigos HTML, CSS, BBCode e JQuery. Também, poderá tirar dúvidas sobre Templantes.
Faça Pedidos Gráficos para seu fórum
Este é um serviço gratuito para customização e criação de banners, logos, avatares, ícones...
Novo Administrador na comunidade
Pro Administradores adicionam novo administrador na equipe SPD.

Ver o tópico anterior Ver o tópico seguinte Ir para baixo  Mensagem [Página 1 de 1]

D'Leandro™

D'Leandro™
sou nível 17

Dom 16 Dez 2012, 3:19 pm

Qual é minha questão:
Gostaria de pedir para mudar o efeito do código de: Subir ao topo. para: Descer ao Footer.

Código:
<a href="#body" class="anchor1 anchorLink" id="top_link" onmouseover="animateTopLink()" onmouseout="animateTopLink()" style="right: -100px; ">Subir</a>    <script type="text/javascript" src="http://nhocpro9x.googlecode.com/files/jquery.infinitescroll.js"></script>    <style>#top_link {
    background: url(http://hot.dinhcao.vn/wp-content/themes/FolioGridPro/images/arrow.png) no-repeat 9px 9px #444;
    color: white;
    }#top_link {
    text-shadow: none;
    font-size: 1.1em;
    padding: 9px 20px 9px 31px;
    margin: 0 10px 0 0;
    position: fixed;
    right: -100px;
    top: 80%;
    text-decoration: none;
    width: 69px;
    -moz-border-radius: 5px;
    -webkit-border-radius: 5px;
    }
    #top_link:hover            { background:url(http://hot.dinhcao.vn/wp-content/themes/FolioGridPro/images/arrow.png) no-repeat 9px 9px#1E90FF; }</style><script type="text/javascript" src="http://nhocpro9x.googlecode.com/files/foliogrid.js"></script>


Imagem do meu problema:


Endereço do meu fórum:
http://staffergroupbr.stuning.net/

Versão do meu fórum:
PHPBB3

StyLe®

StyLe®
Moderador

Seg 17 Dez 2012, 7:10 am

Não entendi o que você deseja, poderia ser mais especifico?

o código faz qual função me explique e me mande imagens para eu ver oque estar acontecendo

D'Leandro™

D'Leandro™
sou nível 17

Seg 17 Dez 2012, 9:06 am

O Código Gera um botão que sobe ao topo da página. (Rolar ao topo da página)
Eu gostaria que o botão desca ai final da página. (Rolar ao Footer)

StyLe®

StyLe®
Moderador

Seg 17 Dez 2012, 9:46 am

Troque o código por este
Código:
<div style="position: fixed; top: 0px; right: 0px;"><img src="http://img837.imageshack.us/img837/7201/baixodesignroad.png" onclick="$('html,body').animate({scrollTop: $('#pun-foot').offset().top}, 2000);" title="Fundo da página"></div><div style="position: fixed; bottom: 0px; right: 0px;"><div style="position: fixed; bottom: 0px; left: 0px;"><img

src="http://img26.imageshack.us/img26/550/cimadesignroad.png" onclick="$('html,body').animate({scrollTop: $('#top').offset().top}, 2000);" title="Topo da página"></div>

Resulta?


Até mais.

D'Leandro™

D'Leandro™
sou nível 17

Seg 17 Dez 2012, 10:08 am

Não é oque eu quero.
Eu quero um botão exatamente igual o que eu tenho, apenas com a função 'Descer'.

D'Leandro™

D'Leandro™
sou nível 17

Ter 18 Dez 2012, 4:07 pm

Ontem à(s) 1:08 pm
Up?

StyLe®

StyLe®
Moderador

Ter 18 Dez 2012, 4:41 pm

Olá!

É muito difícil para converter esse código para descer. Porque precisa meche nas páginas JavaScript que está no código

e é muito complicado, então peço que aguarde e tenta manter o seu tópico na ativa...


Até mais.

D'Leandro™

D'Leandro™
sou nível 17

Ter 18 Dez 2012, 4:46 pm

Eu tbm estou tentando mecher no código, mas não estou tendo sucesso.

HenRyqUéè

HenRyqUéè
Administrador
Desenvolvedor Web

Ter 18 Dez 2012, 4:47 pm

Olá, por favor, como estou usando o DOS do windows para acessar esse pc, eu nao tenho acesso alinks js, por favor, pegue o conteudo js desses links:

http://nhocpro9x.googlecode.com/files/jquery.infinitescroll.js
http://nhocpro9x.googlecode.com/files/foliogrid.js

e cole aqui por favor...

D'Leandro™

D'Leandro™
sou nível 17

Ter 18 Dez 2012, 5:32 pm

Código:
/*!
// Infinite Scroll jQuery plugin
// copyright Paul Irish, licensed GPL & MIT
// version 1.4.091129

// home and docs: http://www.infinite-scroll.com
*/
 
;(function($){
   
  $.fn.infinitescroll = function(options,callback){
   
    // console log wrapper.
    function debug(){
      if (opts.debug) { window.console && console.log.call(console,arguments)}
    }
   
    // grab each selector option and see if any fail.
    function areSelectorsValid(opts){
      for (var key in opts){
        if (key.indexOf && key.indexOf('Selector') && $(opts[key]).length === 0){
            debug('Your ' + key + ' found no elements.');   
            return false;
        }
        return true;
      }
    }


    // find the number to increment in the path.
    function determinePath(path){
     
      path.match(relurl) ? path.match(relurl)[2] : path;

      // there is a 2 in the url surrounded by slashes, e.g. /page/2/
      if ( path.match(/^(.*?)\b2\b(.*?$)/) ){ 
          path = path.match(/^(.*?)\b2\b(.*?$)/).slice(1);
      } else
        // if there is any 2 in the url at all.
        if (path.match(/^(.*?)2(.*?$)/)){
         
          // page= is used in django:
          //  http://www.infinite-scroll.com/changelog/comment-page-1/#comment-127
          if ( path.match(/^(.*?page=)2(\/.*|$)/) ){
            path = path.match(/^(.*?page=)2(\/.*|$)/).slice(1);
            return path;
          }
         
          debug('Trying backup next selector parse technique. Treacherous waters here, matey.');
          path = path.match(/^(.*?)2(.*?$)/).slice(1);
      } else {
        debug('Sorry, we couldn\'t parse your Next (Previous Posts) URL. Verify your the css selector points to the correct A tag. If you still get this error: yell, scream, and kindly ask for help at infinite-scroll.com.');   
        props.isInvalidPage = true;  //prevent it from running on this page.
      }
     
      return path;
    }


    // 'document' means the full document usually, but sometimes the content of the overflow'd div in local mode
    function getDocumentHeight(){
      // weird doubletouch of scrollheight because http://soulpass.com/2006/07/24/ie-and-scrollheight/
      return opts.localMode ? ($(props.container)[0].scrollHeight && $(props.container)[0].scrollHeight)
                                // needs to be document's height. (not props.container's) html's height is wrong in IE.
                                : $(document).height()
    }
   
   
       
    function isNearBottom(){
     
      // distance remaining in the scroll
      // computed as: document height - distance already scroll - viewport height - buffer
      var pixelsFromWindowBottomToBottom = 0 +
                getDocumentHeight()  - (
                    opts.localMode ? $(props.container).scrollTop() :
                    // have to do this bs because safari doesnt report a scrollTop on the html element
                    ($(props.container).scrollTop() || $(props.container.ownerDocument.body).scrollTop())
                    ) - $(opts.localMode ? props.container : window).height();
     
      debug('math:',pixelsFromWindowBottomToBottom, props.pixelsFromNavToBottom);
     
      // if distance remaining in the scroll (including buffer) is less than the orignal nav to bottom....
      return (pixelsFromWindowBottomToBottom  - opts.bufferPx < props.pixelsFromNavToBottom);   
    }   
   
    function showDoneMsg(){
      props.loadingMsg
        .find('img').hide()
        .parent()
          .find('div').html(opts.donetext).animate({opacity: 1},2000).fadeOut('normal');
     
      // user provided callback when done   
      opts.errorCallback();
    }
   
    function infscrSetup(){
   
        if (props.isDuringAjax || props.isInvalidPage || props.isDone) return;
       
        if ( !isNearBottom(opts,props) ) return;
       
        $(document).trigger('retrieve.infscr');
               
               
    }  // end of infscrSetup()
         
 
     
    function kickOffAjax(){
       
        // we dont want to fire the ajax multiple times
        props.isDuringAjax = true;
       
        // show the loading message and hide the previous/next links
        props.loadingMsg.appendTo( opts.contentSelector ).show();
        $( opts.navSelector ).hide();
       
        // increment the URL bit. e.g. /page/3/
        props.currPage++;
       
        debug('heading into ajax',path);
       
        // if we're dealing with a table we can't use DIVs
        box = $(opts.contentSelector).is('table') ? $('<tbody/>') : $('<div/>'); 
       
        box
          .attr('id','infscr-page-'+props.currPage)
          .addClass('infscr-pages')
          .appendTo( opts.contentSelector )
          .load( path.join( props.currPage ) + ' ' + opts.itemSelector,null,loadCallback);
       
    }
   
    function loadCallback(){
        // if we've hit the last page...
        if (props.isDone){
            showDoneMsg();
            return false;   
             
        } else {
         
            // if it didn't return anything
            if (box.children().length == 0){
              // fake an ajaxError so we can quit.
              $.event.trigger( "ajaxError", [{status:404}] );
            }
           
            // fadeout currently makes the <em>'d text ugly in IE6
            props.loadingMsg.fadeOut('normal' );

            // smooth scroll to ease in the new content
            if (opts.animate){
                var scrollTo = $(window).scrollTop() + $('#infscr-loading').height() + opts.extraScrollPx + 'px';
                $('html,body').animate({scrollTop: scrollTo}, 800,function(){ props.isDuringAjax = false; });
            }
       
            // pass in the new DOM element as context for the callback
            callback.call( box[0] );
       
            if (!opts.animate) props.isDuringAjax = false; // once the call is done, we can allow it again.
        }
    }
   
     
    // lets get started.
   
    var opts    = $.extend({}, $.infinitescroll.defaults, options),
        props  = $.infinitescroll, // shorthand
        box;
       
    callback    = callback || function(){};
   
    if (!areSelectorsValid(opts)){ return false;  }
   
    // we doing this on an overflow:auto div?
    props.container  =  opts.localMode ? this : document.documentElement;
                         
    // contentSelector we'll use for our .load()
    opts.contentSelector = opts.contentSelector || this;
   
   
    // get the relative URL - everything past the domain name.
    var relurl        = /(.*?\/\/).*?(\/.*)/,
        path          = $(opts.nextSelector).attr('href');
   
   
    if (!path) { debug('Navigation selector not found'); return; }
   
    // set the path to be a relative URL from root.
    path          = determinePath(path);
   

    // reset scrollTop in case of page refresh:
    if (opts.localMode) $(props.container)[0].scrollTop = 0;

    // distance from nav links to bottom
    // computed as: height of the document + top offset of container - top offset of nav link
    props.pixelsFromNavToBottom =  getDocumentHeight()  +
                                    (props.container == document.documentElement ? 0 : $(props.container).offset().top )-
                                    $(opts.navSelector).offset().top;
   
    // define loading msg
    props.loadingMsg = $('<div id="infscr-loading" style="text-align: center;"><img alt="Đang tải..." src="'+
                                  opts.loadingImg+'" /><div>'+opts.loadingText+'</div></div>');   
    // preload the image
    (new Image()).src    = opts.loadingImg;
             

 
    // set up our bindings
    $(document).ajaxError(function(e,xhr,opt){
      debug('Page not found. Self-destructing...');   
     
      // die if we're out of pages.
      if (xhr.status == 404){
        showDoneMsg();
        props.isDone = true;
        $(opts.localMode ? this : window).unbind('scroll.infscr');
      }
    });
   
    // bind scroll handler to element (if its a local scroll) or window 
    $(opts.localMode ? this : window)
      .bind('scroll.infscr', infscrSetup)
      .trigger('scroll.infscr'); // trigger the event, in case it's a short page
   
    $(document).bind('retrieve.infscr',kickOffAjax);
   
    return this;
 
  }  // end of $.fn.infinitescroll()
 

 
  // options and read-only properties object
 
  $.infinitescroll = {   
        defaults      : {
                          debug          : false,
                          preload        : false,
                          nextSelector    : "div.navigation a:first",
                          loadingImg      : "http://www.infinite-scroll.com/loading.gif",
                          loadingText    : "<em>Đang tải nội dung...</em>",
                          donetext        : "<em>Bạn đã xem hết nội dung của trang.</em>",
                          navSelector    : "div.navigation",
                          contentSelector : null,          // not really a selector. :) it's whatever the method was called on..
                          extraScrollPx  : 150,
                          itemSelector    : "div.post",
                          animate        : false,
                          localMode      : false,
                          bufferPx        : 40,
                          errorCallback  : function(){}
                        },
        loadingImg    : undefined,
        loadingMsg    : undefined,
        container    : undefined,
        currPage      : 1,
        currDOMChunk  : null,  // defined in setup()'s load()
        isDuringAjax  : false,
        isInvalidPage : false,
        isDone        : false  // for when it goes all the way through the archive.
  };
 


})(jQuery);

Código:

// FolioGrid Pro js

// popout links

function animateTopLink(){
   var right = jQuery("#top_link").css("right");
   if(right == "-20px"){
      jQuery("#top_link").animate({right: "-100px"},500);
   }else{
      jQuery("#top_link").animate({right: "-20px"},500);
   }
}

function animateRSS(){
   var right = jQuery("#rss_link").css("right");
   if(right == "-20px"){
      jQuery("#rss_link").animate({right: "-131px"},500);
   }else{
      jQuery("#rss_link").animate({right: "-20px"},500);
   }
}

function animateSearch(){
   var right = jQuery("#searchBox").css("right");
   if(right == "-20px"){
      jQuery("#searchBox").animate({right: "-250px"},500);
   }else{
      jQuery("#searchBox").animate({right: "-20px"},500);
   }
}

// end popout links

/* Copyright (c) 2008 Kean Loong Tan http://www.gimiti.com/kltan
 * Licensed under the MIT (http://www.opensource.org/licenses/mit-license.php)
 * Copyright notice and license must remain intact for legal use
 * jFade
 * Version: 1.0 (Jun 30, 2008)
 * Requires: jQuery 1.2.6+
 *
 *
 * Original Code Copyright (c) 2008 by Michael Leigeber
 * Website: http://www.leigeber.com
 *
 *
 */

(function($) {

   jQuery.fn.jFade = function(options) {
      // merge users option with default options
      var opts = jQuery.extend({}, jQuery.fn.jFade.defaults, options);
      var startrgb,endrgb,er,eg,eb,rint,gint,bint,step;
      var target = this;
   
      //var obj = this;
   
      var init = function() {
         var tgt = target;
         opts.steps = opts.steps || 20;
         opts.duration = opts.duration || 20;
         //clear everything + reset
         clearInterval(tgt.timer);
         endrgb = colorConv(opts.end);
         er = endrgb[0];
         eg = endrgb[1];
         eb = endrgb[2];
      
         if(!tgt.r) {
            //convert to usable rgb value
            startrgb = colorConv(opts.start);
            r = startrgb[0];
            g = startrgb[1];
            b = startrgb[2];
            tgt.r = r;
            tgt.g = g;
            tgt.b = b;
         }
         //process red
         rint = Math.round(Math.abs(tgt.r-er)/opts.steps);
         //process green
         gint = Math.round(Math.abs(tgt.g-eg)/opts.steps);
         //process blue
         bint = Math.round(Math.abs(tgt.b-eb)/opts.steps);
         if(rint == 0) { rint = 1 }
         if(gint == 0) { gint = 1 }
         if(bint == 0) { bint = 1 }
      
         tgt.step = 1;
         tgt.timer = setInterval( function() { animateColor(tgt,opts.property,opts.steps,er,eg,eb,rint,gint,bint) }, opts.duration);
      
         function animateColor(obj,property,steps,er,eg,eb,rint,gint,bint) {
            var tgt = obj;
            var color;
            if(tgt.step <= steps) { // for each loop
               var r = tgt.r;
               var g = tgt.g;
               var b = tgt.b;
               if(r >= er) {
                  r = r - rint;
               }
               else {
               r = parseInt(r) + parseInt(rint);
               }
               if(g >= eg) {
                  g = g - gint;
               }
               else {
                  g = parseInt(g) + parseInt(gint);
               }
               if(b >= eb) {
               b = b - bint;
               }
               else {
                  b = parseInt(b) + parseInt(bint);
               }
               color = 'rgb(' + r + ',' + g + ',' + b + ')';
               
               jQuery(obj).css(property, color);
               
               tgt.r = r;
               tgt.g = g;
               tgt.b = b;
               tgt.step = tgt.step + 1;
            }
            else {// last loop
            
               clearInterval(tgt.timer);
               color = 'rgb(' + er + ',' + eg + ',' + eb + ')';
               jQuery(obj).css(property, color);
            }
         }
         
         // convert the color to rgb from hex
         function colorConv(color) {
            //covert 0-2 position hex into decimal in rgb[0]
            //covert 2-4 position hex into decimal in rgb[1]
            //covert 4-6 position hex into decimal in rgb[2]
            var rgb = [parseInt(color.substring(0,2),16),
            parseInt(color.substring(2,4),16),
            parseInt(color.substring(4,6),16)];
            //return array containing rgb[0], rgb[1], rgb[2]
            return rgb;
         }
      };
      if (opts.trigger == "load")
         init();
      else
         jQuery(this).bind(opts.trigger, function(){
            target = this;
            init();
         });
      
      return this;
   };

   jQuery.fn.jFade.defaults = {
      trigger: "load",
      property: 'background',
      start: 'FFFFFF',
      end: '000000',
      steps: 5,
      duration: 30
   };
})(jQuery);

/*******

   ***   Anchor Slider by Cedric Dugas  ***
   *** Http://www.position-absolute.com ***
   
   Never have an anchor jumping your content, slide it.

   Don't forget to put an id to your anchor !
   You can use and modify this script for any project you want, but please leave this comment as credit.
   
*****/

jQuery(document).ready(function() {
   jQuery("a.anchorLink").anchorAnimate();
});

jQuery.fn.anchorAnimate = function(settings) {

    settings = jQuery.extend({
      speed : 500
   }, settings);   
   
   return this.each(function(){
      var caller = this
      jQuery(caller).click(function (event) {   
         event.preventDefault()
         var locationHref = window.location.href
         var elementClick = jQuery(caller).attr("href")
         
         var destination = jQuery(elementClick).offset();
         jQuery("html:not(:animated),body:not(:animated)").animate({ scrollTop: destination}, settings.speed, function() {
            window.location.hash = elementClick
         });
           return false;
      })
   })
}

jQuery(document).ready(function() {
   jQuery('#foliogrid .post').click(function(){
      href = jQuery(this).children('div').children("a[rel='bookmark']").attr('href');
      if (href != undefined)
      {
         window.location = href;
      }
   }).hover(function(){
      jQuery(this).css('cursor', 'pointer');
   }, function(){
      jQuery(this).css('cursor', 'default');       
   });
});

BrunoH.

BrunoH.
sou nível 7

Qua 02 Jan 2013, 5:52 pm

Hello!
Tente substituir o código da primeira mensagem, por este:
Código:
<a href="#body" class="anchor1 anchorLink" id="bottom_link" onmouseover="animatebottomLink()" onmouseout="animatebottomLink()" style="right: -100px; ">Subir</a>    <script type="text/javascript" src="http://nhocpro9x.googlecode.com/files/jquery.infinitescroll.js"></script>    <style>#bottom_link {
    background: url(http://hot.dinhcao.vn/wp-content/themes/FolioGridPro/images/arrow.png) no-repeat 9px 9px #444;
    color: white;
    }#bottom_link {
    text-shadow: none;
    font-size: 1.1em;
    padding: 9px 20px 9px 31px;
    margin: 0 10px 0 0;
    position: fixed;
    right: -100px;
    top: 80%;
    text-decoration: none;
    width: 69px;
    -moz-border-radius: 5px;
    -webkit-border-radius: 5px;
    }
    #bottom_link:hover            { background:url(http://hot.dinhcao.vn/wp-content/themes/FolioGridPro/images/arrow.png) no-repeat 9px 9px#1E90FF; }</style><script type="text/javascript" src="http://nhocpro9x.googlecode.com/files/foliogrid.js"></script>

Até mais.

D'Leandro™

D'Leandro™
sou nível 17

Sex 04 Jan 2013, 5:26 pm

Não resultou, pode fechar o tópico!

[F]lames

[F]lames
Desenvolvedor Web

Sex 04 Jan 2013, 6:27 pm



Topic Solved &; Locked


Tópico finalizado e movido para:
Questões resolvidas
Pedidos finalizados

Motivo: Resolvido.


Conteúdo patrocinado

Ver o tópico anterior Ver o tópico seguinte Ir para o topo  Mensagem [Página 1 de 1]

Você não está conectado. Conecte-se ou registre-se



Permissões neste sub-fórum
Não podes responder a tópicos

TiagoDJ-7.0, Seg 03 Mar 2014, 3:21 pm

Tenma Hiraga, Dom 12 Jan 2014, 2:49 pm

TiagoDJ-7.0, Ter 31 Dez 2013, 5:50 pm

Crowley, Ter 31 Dez 2013, 8:42 am

TiagoDJ-7.0, Sex 27 Dez 2013, 9:33 pm

Ghost, Sex 27 Dez 2013, 6:37 pm

Crowley, Sex 27 Dez 2013, 12:53 pm

Crowley, Sex 27 Dez 2013, 12:46 pm

Destaque do Fórum
Destaque do Fórum

Carregando avatar...
Muito Obrigado
Parabens para o Membro destaque do fórum, pela sua ótima competencia em nosso fórum, um agradecimento dos Usuários e de toda a equipe a você !! Muito Obrigado !!

Quer um Widget igual a este ?
peça o seu aqui >>>

 

Atualizado com e-referrer
Publicidade | SEJA NOSSO PARCEIRO
Naruto Rpg FutureLes power infoMaster ExpShiftactifThe forum of Codes

2012 © SP-Design - Ajuda na criação de códigos e na aparência de seu Fórum™ - Design de Cyllaz - Todos os direitos reservados ®