2
So I have this ul
HTML
<div class="atividades">
<ul>
<li">Agência Funerária</li>
<li>Funerais</li>
<li>Cremações</li>
<li>Trasladações</li>
<li>Tanatopraxias</li>
<li>Exumações</li>
<li>Artigos Religiosos</li>
<li>Atendimento 24h</li>
</ul>
</div>
CSS
div.atividades {
position: absolute;
z-index:120;
top: calc(50% - 40px);
left:calc(50% - 250px);
width: 500px;
padding: 0;
}
div.atividades ul{
width:100%;
}
div.atividades ul li{
display:none;
position:absolute;
width:100%;
vertical-align:middle;
text-align:center;
font-size:50px;
}
.ativa {
/*efeito*/
}
And the next jQuery which allows me to make each li
appears in sequence. That is, add the first and appear the second. So on!
<script>
$(document).ready(function(e) {
var li = $("div.atividades li.ativa");
var first = $(".div.atividades ul li:first");
first.show();
function addcls() {
li.hide().removeClass("ativa");
li = li.next();
if (!li.length){ //se passou o ultimo
li = first; //volta ao primeiro
}
li.show().addClass("ativa");
};
setInterval(addcls, 3000);
});
</script>
My goal now is to make one CSS
or JQuery
that, when appearing to read, it gains the following effect:
Appears with fade-up
(down up. and coming up, take a break for about 3 seconds and then take a fade-down
(up-down).
Similar to what occurs in http://www.funerariatriunfo.pt/
If the function is m CSS
, is already created the class .ativa
that is still empty
How to do this?
@altered dvd :)
– user60252
Cool, but have you put the first li to suffer the event too? That is, when the page open for the first time! Because the text is appearing abruptly without the style. Only in the second I read that the effect happens to appear
– Carlos Rocha
In fact it works. However, it takes a long time to appear the first li. Being an empty space for a long time. What doesn’t happen in http://www.funerariatriumphant.pt/. But if it’s hard, it’s okay: You’ve helped a lot. Leave a little for other people. Thank you!
– Carlos Rocha
@dvd, and not even exste, I put the part of the plugin that interests directly in the code. In the tests I was loading the script code from a separate file of the html code of the page
– user60252
I made the adaptation to my code within a slide show and it didn’t work, can anyone please help me find out why? Where did I go wrong? Obs.: separately works well. http://funerariasaopedro.net.br/new/ Guys, it’s just the slide part ok, the rest don’t need to see! Thanks!
– Carlos Rocha
@Carlosrocha this code does not fit well to your page because the images are not compatible. See http://kithomepage.com/sos/lisboa.htm
– user60252
@Carlosrocha independent of the images there is incompatibility of the used libraries
– user60252
The images ..... ... http://kithomepage.com/sos/lisobedesce.htm
– user60252
Forgive me, I did not understand the "If you remake the images..." How so? ode explain better doing favor?
– Carlos Rocha
Wow, I put in two links, one with the original images, it was all fucked up, and the second link with the images I edited.
– user60252