Ir para conteúdo

Arquivado

Este tópico foi arquivado e está fechado para novas respostas.

PRSolucaoWeb

Rolar noticias

Recommended Posts

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><strong>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><img'> src='images/cod_1074.jpg' width='173' height='129'></a></div><div class='inf-destaque'> <p>Comercial / Galpão </p><ul><li> <p>Área Útil: 1.422 m²</p></li></ul><ul><li><p>Vagas: 20</p></li> </ul><strong>R$ 13.000.000,00 Venda</strong><br><strong>R$ 85.000,00 Locação </strong><p> </p> <p><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><strong>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><img'> src='images/cod_1169.jpg' width='173' height='129'></a></div><div class='inf-destaque'><ul><li><p>Casa / Sobrado </p></li></ul><ul> <li> <p>Área Útil: 650 m²</p> </li> </ul> <ul> <li><p>Dormitórios: 4</p></li></ul><ul><li><p>Suítes: 4</p></li></ul><strong>R$ 2.700.000,00 Venda</strong><br><strong>R$ 17.000,00 Locação </strong> <p> </p> <p><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><strong>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'><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

Compartilhar este post


Link para o post
Compartilhar em outros sites

Olá, Paulo.

Tente usar o console do navegador, e veja se alguma mensagem de erro é exibida.

 

Veja também se existe algum demo no dynamicdrive.com, que você possa nos exibir aqui. Dessa forma fica mais fácil a gente procurar pelo problema junto contigo ;)

 

Aliás, utilize a opção 'Código' durante a composição de seu post, que isso facilita bastante a compreensão do código, caso seja necessário alterá-lo ou reproduzi-lo.

 

Abraços.

Compartilhar este post


Link para o post
Compartilhar em outros sites

Eu fiz uns teste reduzindo seus code.

 

Entendo muito pouco de javascript.

 

Mas pelo que percebi, você está usando a (class="youtube") que vem de um Script (colorBox) e você está usando dentro de outro Script (Marquee).

 

De alguma forma isso está bloqueando sua Modal.

 

Como disse, sou Leigo em JavaScript, não sei se isso é possível ou como contornar isso.

 

Mas de qualquer forma, se mais alguém for ler este seu Post, já sabem onde se Concentrar.

 

* Ou você tenta achar outro script de Marquee que deixe o texto fora do script.

 

* Ou esperar e ver se alguém contorna essa solução.

 

Boa sorte.

Compartilhar este post


Link para o post
Compartilhar em outros sites

×

Informação importante

Ao usar o fórum, você concorda com nossos Termos e condições.