Click here to Skip to main content
15,891,375 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have used 4 div .one for image ,rest 3 for text .
only visble on div at a time .I need to knw how to get the text corresponding to div also .

Actully i am first to use javascript .so i dnt knw how to slide text on same div.

I have written a code .I am pasting this code along with this .If u can help me ..pls ......


XML
<html>
<Head>
<meta http-equiv='Content-Type' content='text/html;  charset=x-user-defined'>
</Head>

<body style='background-color:white' topmargin=0 leftmargin=0> onload= firstSlide();>

<style type='Text/css'>
div#divMarq  (z-index: 0;position: absolute;)
div#divMarq1  (z-index: 0;position: absolute;)
div#divMarq2  (z-index: 0;position: absolute;)
div#divimglogo ( z-index: 1;position: absolute;left:0;top:0 )
</style>

<script type='Text/javascript'></script>

<DIV ID='divimglogo' style='position:absolute; top:0px; left:0px;width:800px;height:20px;

background-color:Window;'></DIV>

<DIV ID='divMarq' STYLE='visibility:visible;position:absolute;top:0;left:5

;color:#FF8000;width:800px;height:94px;overflow:hidden;opacity:1; border:0px solid  WRAP=OFF'>
<span style="font-family:Microsoft Sans Serif ;font-size: 8.25 pt; color :Black;">
45 645 656 56546456

456456</span></DIV>


<DIV ID='divMarq1' STYLE='visibility:visible;position:absolute;top:25;left:10

;color:#FF8000;width:539px;height:94px;overflow:hidden;opacity:1; border:0px solid  WRAP=OFF'> </DIV>



<script type='text/javascript' language='javascript'></script></span><span style="font-family:Microsoft

Sans Serif ;font-size: 8.25 pt; color :Black;">
tryrty rtyrrtr </span></DIV>

<DIV ID='divMarq2' STYLE='visibility:visible;position:absolute;top:40;left:10

;color:#FF8000;width:539px;height:94px;overflow:hidden;opacity:1; border:0px solid  WRAP=OFF'>

</span><span style="font-family:Microsoft Sans Serif ;font-size: 8.25 pt; color

:Black;">456546</span></DIV>

<SCRIPT>
var slideArray = new Array();
var slide1='tt ryrtyyt ry rty rty'
var slide2='4355435543555345'
function firstSlide()
{
slideArray[0]=slide1;

document.getElementById('divMarq1').innerHTML=slideArray[0];
setTimeout('secondSlide()',100);
}
function secondSlide()
{slideArray[1]=slide2;
document.getElementById('divMarq2').innerHTML=slideArray[1];
setTimeout('firstSlide()',100);}
</SCRIPT>

 </body>

</html>
Posted

1 solution

Have a look here, http://jqueryui.com/demos/effect/[^]

Also, it makes no sense to have CSS for the divs, then use in-line styles for them, particularly when the styles duplicate the CSS.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900