Rolar noticias
Boa tarde
Estou montando uma pagina que precisa rolar noticias de baixo para cima sem deixar buraco branco.
Então estou utilizando essa função:
<script type="text/javascript">
/*
Cross browser Marquee II- © Dynamic Drive (www.dynamicdrive.com)
For full source code, 100's more DHTML scripts, and TOS, visit http://www.dynamicdrive.com
Modified by jscheuer1 for continuous content. Credit MUST stay intact for use
*/
//Specify the marquee's width (in pixels)
var marqueewidth="250px"
//Specify the marquee's height
var marqueeheight="350px"
//Specify the marquee's marquee speed (larger is faster 1-10)
var marqueespeed=1
//Specify initial pause before scrolling in milliseconds
var initPause=500
//Specify start with Full(1)or Empty(0) Marquee
var full=1
//Pause marquee onMousever (0=no. 1=yes)?
var pauseit=1
//Specify Break characters for IE as the two iterations
//of the marquee, if text, will be too close together in IE
var iebreak='<p></p>'
//Specify the marquee's content
//Keep all content on ONE line, and backslash any single quotations (ie: that\'s great):
var marqueecontent="<div class='titulo-destaque'><strong>APARTAMENTO<br>ITAIM BIBI - SÃO PAULO - SP</strong></div><div class='view-destaque'><a class='youtube' href='http://www.imobilife.com.br/imoveis/para-venda/em-sao-paulo/no-bairro-itaim-bibi/apartamento-padrao/id-1090.html'><img src='images/cod_1081.jpg' width='150' height='155'></a></div><div class='inf-destaque'><p>Área Útil: 71 m²</p><ul><li>Dormitórios: 3</li></ul><ul><li>Vagas: 2</li></ul><ul><li>Banheiros: 2<br><strong>R$ 889.000,00 Venda </strong></li></ul><p> </p><p><a class='youtube' href='http://www.imobilife.com.br/imoveis/para-venda/em-sao-paulo/no-bairro-itaim-bibi/apartamento-padrao/id-1090.html>Clique'> e saiba mais</strong></a></p><hr></div> <div class='titulo-destaque'>COMERCIAL - GALPÃO <br> VILA JAGUARÉ - SÃO PAULO - SP</div><div class='view-destaque'><a class='youtube' href='http://www.imobilife.com.br/imoveis/para-venda-ou-locacao/em-sao-paulo/no-bairro-vila-jaguare/comercial-galpao/id-1083.html> href='[http://www.imobilife.com.br/imoveis/para-venda-ou-locacao/em-sao-paulo/no-bairro-vila-jaguare/comercial-galpao/id-1083.html>Clique'> e saiba mais</strong></a></p><hr></div> <div class='titulo-destaque'>CASA / SOBRADO<br> GRANJA VIANA - CARAPICUÍBA - SP</div> <div class='view-destaque'><a class='youtube' href='http://www.imobilife.com.br/imoveis/para-venda-ou-locacao/em-carapicuiba/no-bairro-granja-viana/casa-sobrado/id-1178.html> href='[http://www.imobilife.com.br/imoveis/para-venda-ou-locacao/em-carapicuiba/no-bairro-granja-viana/casa-sobrado/id-1178.html>Clique'> e saiba mais</strong></a></p><hr></div> "
////NO NEED TO EDIT BELOW THIS LINE////////////
var copyspeed=marqueespeed
var pausespeed=(pauseit==0)? copyspeed: 0
var iedom=document.all||document.getElementById
var actualheight=''var cross_marquee, cross_marquee2, ns_marquee
function populate(){
if (iedom){
var lb=document.getElementById&&!document.all? '' : iebreak
cross_marquee=document.getElementById? document.getElementById("iemarquee") : document.all.iemarquee
cross_marquee2=document.getElementById? document.getElementById("iemarquee2") : document.all.iemarquee2
cross_marquee.style.top=(full==1)? '8px' : parseInt(marqueeheight)+8+"px"
cross_marquee2.innerHTML=cross_marquee.innerHTML=marqueecontent+lb
actualheight=cross_marquee.offsetHeight
cross_marquee2.style.top=(parseInt(cross_marquee.style.top)+actualheight+8)+"px" //indicates following #1
}
else if (document.layers){
ns_marquee=document.ns_marquee.document.ns_marquee2
ns_marquee.top=parseInt(marqueeheight)+8
ns_marquee.document.write(marqueecontent)
ns_marquee.document.close()
actualheight=ns_marquee.document.height
}
setTimeout('lefttime=setInterval("scrollmarquee()",40)',initPause)
}
window.onload=populate
function scrollmarquee(){
if (iedom){
if (parseInt(cross_marquee.style.top)<(actualheight*(-1)+8))
cross_marquee.style.top=(parseInt(cross_marquee2.style.top)+actualheight+8)+"px"
if (parseInt(cross_marquee2.style.top)<(actualheight*(-1)+8))
cross_marquee2.style.top=(parseInt(cross_marquee.style.top)+actualheight+8)+"px"
cross_marquee2.style.top=parseInt(cross_marquee2.style.top)-copyspeed+"px"
cross_marquee.style.top=parseInt(cross_marquee.style.top)-copyspeed+"px"
}
else if (document.layers){
if (ns_marquee.top>(actualheight*(-1)+8))
ns_marquee.top-=copyspeed
else
ns_marquee.top=parseInt(marqueeheight)+8
}
}
if (iedom||document.layers){
with (document){
if (iedom){
write('<div style="position:relative;width:'+marqueewidth+';height:'+marqueeheight+';overflow:hidden" onMouseover="copyspeed=pausespeed" onMouseout="copyspeed=marqueespeed">')
write('<div id="iemarquee" style="position:absolute;left:10px;top:0px;width:100%;">')
write('</div><div id="iemarquee2" style="position:absolute;left:10px;top:0px;width:100%;z-index:100;background:white;">')
write('</div></div>')
}
else if (document.layers){
write('<ilayer width='+marqueewidth+' height='+marqueeheight+' name="ns_marquee">')
write('<layer name="ns_marquee2" width='+marqueewidth+' height='+marqueeheight+' left=0 top=0 onMouseover="copyspeed=pausespeed" onMouseout="copyspeed=marqueespeed"></layer>')
write('</ilayer>')
}
}
}
</script>
Mas aqui no link <a class='youtube' href='[http://www.imobilife.com.br/imoveis/para-venda/em-sao-paulo/no-bairro-itaim-bibi/apartamento-padrao/id-1090.html](http://www.imobilife.com.br/imoveis/para-venda/em-sao-paulo/no-bairro-itaim-bibi/apartamento-padrao/id-1090.html)'><img src='images/cod_1081.jpg' width='150' height='155'></a>
Preciso abrir uma pagina estilo COLORBOX que abre a pagina na mesma com o fundo transparent.
Ai chamo com a class='youtube'.
Função para abrir a janela:
<link href="colorbox-master/example3/colorbox.css" rel="stylesheet" type="text/css" />
<script src="colorbox-master/jquery.colorbox.js"></script>
<script>
$(document).ready(function(){
//Examples of how to assign the Colorbox event to elements
$(".group1").colorbox({rel:'group1'});
$(".group2").colorbox({rel:'group2', transition:"fade"});
$(".group3").colorbox({rel:'group3', transition:"none", width:"75%", height:"75%"});
$(".group4").colorbox({rel:'group4', slideshow:true});
$(".ajax").colorbox();
$(".atendimento").colorbox({iframe:false, innerWidth:1200, innerHeight:800});
$(".youtube").colorbox({iframe:true, innerWidth:1200, innerHeight:800});
$(".youtube1").colorbox({iframe:true, innerWidth:500, innerHeight:350});
$(".youtube2").colorbox({iframe:true, innerWidth:500, innerHeight:400});
$(".vimeo").colorbox({iframe:true, innerWidth:500, innerHeight:409});
$(".iframe").colorbox({iframe:true, width:"80%", height:"80%"});
$(".inline").colorbox({inline:true, width:"50%"});
$(".callbacks").colorbox({
onOpen:function(){ alert('onOpen: colorbox is about to open'); },
onLoad:function(){ alert('onLoad: colorbox has started to load the targeted content'); },
onComplete:function(){ alert('onComplete: colorbox has displayed the loaded content'); },
onCleanup:function(){ alert('onCleanup: colorbox has begun the close process'); },
onClosed:function(){ alert('onClosed: colorbox has completely closed'); }
});
$('.non-retina').colorbox({rel:'group5', transition:'none'})
$('.retina').colorbox({rel:'group5', transition:'none', retinaImage:true, retinaUrl:true});
//Example of preserving a JavaScript event for inline calls.
$("#click").click(function(){
$('#click').css({"background-color":"#f00", "color":"#fff", "cursor":"inherit"}).text("Open this window again and this message will still be here.");
return false;
});
});
</script>
Mas não está funcionando.
Alguém poderia me ajudar nesta questão?
Muito obrigado.
Paulo Rogério
Discussão (4)
Carregando comentários...