title: How to write html with javascript and display it on a slider?
body: <p>I have created a basic slider that runs through images every 5 seconds while using javascript. My slider works just fine, but I'm not wanting to use it as an image slider anymore. I'm wanting to create a div with some more html design features and post that within my slider instead of my images. Going by this code below, what would I have to change and add to make it work?</p>
  
  <pre><code> &lt;!doctype html&gt;
   &lt;html&gt;
   &lt;head&gt;
   &lt;title&gt;Ad Slider&lt;/title&gt;
   &lt;style&gt;
   #slider
   {
      width: 800px;
      height: 200px;
   }
   #sliderImages
   {
      width: 100%;
      height: 100%;
      border: 1px solid #06c;
  border-radius: 10px;
   }
   &lt;/style&gt;
   &lt;script type = "text/javascript"&gt;
  var image1 = new Image();
  image1.src = "sky.jpg";
  var image2 = new Image();
  image2.src = "chatImage.jpg";
  var image3 = new Image();
  image3.src = "orange.jpg";
   &lt;/script&gt;
   &lt;/head&gt;
   &lt;body&gt;
   &lt;div id = "slider"&gt;
      &lt;img id = "sliderImages" src = "sky.jpg" name = "slide" /&gt;
      &lt;script type = "text/javascript"&gt;
     var sliderAd = 1
     function slideAds()
     {
        if (!document.images)
        {
       return;
        }
        document.images.slide.src = eval("image"+sliderAd+".src")
        if (sliderAd &lt; 3)
        {
           sliderAd++;
        }
        else
        {
       sliderAd = 1;
        }
        setTimeout("slideAds()",5000)
     }
     slideAds()
  &lt;/script&gt;
   &lt;/div&gt;
   &lt;/body&gt;
   &lt;/html&gt;
  </code></pre>
  
  <p>Now instead of adding those images, how can I add this type of content but working the same way like the images were?</p>
  
  <pre><code> &lt;div&gt;
      &lt;p&gt;Some Content&lt;/p&gt;
   &lt;/div&gt;
  </code></pre>