Informações:
Autor: Wagner
Funcionalidade: Todas as Versões
Acesse:
Crie um novo Javascript com investimento em todas as paginas com esse codigo:Painel de Controle ☛ Modulos ☛ Html e Javascript ☛ Gestão dos codigos Javascript
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:
Adicione esse codigo CSS em sua folha de estilo:Painel de Controle ☛ Visualização ☛ Imagens e Cores ☛ Cores ☛ Folha de Estilo
- Código:
.mf{
position: fixed;
top: 0;
right: 0;
left: 0;
z-index: 999;
}