Best Style

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

Menu fixo ao rolar a pagina

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

Sliw

Sliw
Administrador
Informações:
Autor
: Wagner
Funcionalidade: Todas as Versões




Acesse:
Painel de Controle Modulos Html e Javascript Gestão dos codigos Javascript
Crie um novo Javascript com investimento em todas as paginas com esse codigo:
PunBB:
Código:
/*
 // Fixed menu on scroll
 // This code will add a class to the menu on scroll, you just need to add a CSS rule on your stylesheet...
 // Author: Wagner ( /waghcwb )
 // Last update: 30/05/2014
 // © This work is free and you can modify or distribute it, but you need to keep this credits.
 */
//<![CDATA[
$(function(){
var w = $(window),
    n = $('#pun-navlinks'),
    s = function(){
            w.scrollTop() > 100 ? n.addClass('mf') : n.removeClass('mf');
        };
    w.scroll(s);
});
//]]>
PhpBB2:
Código:
/*
 // Fixed menu on scroll
 // This code will add a class to the menu on scroll, you just need to add a CSS rule on your stylesheet...
 // Author: Wagner ( /waghcwb )
 // Last update: 30/05/2014
 // © This work is free and you can modify or distribute it, but you need to keep this credits.
 */
//<![CDATA[
$(function(){
var w = $(window),
    n = $('a.mainmenu').parent('td'),
    s = function(){
            w.scrollTop() > 100 ? n.addClass('mf') : n.removeClass('mf');
        };
    w.scroll(s);
});
//]]>
PhpBB3:
Código:
/*
 // Fixed menu on scroll
 // This code will add a class to the menu on scroll, you just need to add a CSS rule on your stylesheet...
 // Author: Wagner ( /waghcwb )
 // Last update: 30/05/2014
 // © This work is free and you can modify or distribute it, but you need to keep this credits.
 */
//<![CDATA[
$(function(){
var w = $(window),
    n = $('.navlinks'),
    s = function(){
            w.scrollTop() > 100 ? n.addClass('mf') : n.removeClass('mf');
        };
    w.scroll(s);
});
//]]>
Invision:
Código:
/*
 // Fixed menu on scroll
 // This code will add a class to the menu on scroll, you just need to add a CSS rule on your stylesheet...
 // Author: Wagner ( /waghcwb )
 // Last update: 30/05/2014
 // © This work is free and you can modify or distribute it, but you need to keep this credits.
 */
//<![CDATA[
$(function(){
var w = $(window),
    n = $('#submenu'),
    s = function(){
            w.scrollTop() > 100 ? n.addClass('mf') : n.removeClass('mf');
        };
    w.scroll(s);
});
//]]>

Feito isto acesse:
Painel de Controle Visualização Imagens e Cores Cores Folha de Estilo
Adicione esse codigo CSS em sua folha de estilo:
Código:
.mf{
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: 999;
}

https://beststyle.forumeiros.com

Sliw

Sliw
Administrador
Tutorial Aceito

https://beststyle.forumeiros.com

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

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