js picture rotation and...

Posted on 2014-07-13
Last Modified: 2014-07-15
I have the attached code rotating some images.

Question 1: How can I add a text box showing some description about the picture (please see the attache image)?
Question 2: How can add the little circles (one per pic) with the one led-up for the current picture?

I hope you can give me a working sample of some sort, if you have any, instead of writing about it.

Thank you.

<!DOCTYPE html>

	<link type="text/css" href="main.css" rel="stylesheet"/>

	<div id = "project-pictures">
	<img src="images/img1.jpg" height="505" width="942"id="mainImage"/>

	<script src="script.js"></script>



var myImage = document.getElementById("mainImage");

var imageArray = ["images/img2.jpg","images/img3.jpg"];

var imageIndex = 0;

function changeImage() {
	if (imageIndex >= imageArray.length) {
	imageIndex = 0;

var intervalHandle = setInterval(changeImage,5000);

Open in new window

Question by:Mike Eghtebas
    LVL 75

    Accepted Solution

    Use a transparent div with the text and position it relative to the image with a higher z-index.

    Alternatively just download and use
    LVL 33

    Author Closing Comment

    by:Mike Eghtebas
    Thank you.

    Featured Post

    Looking for New Ways to Advertise?

    Engage with tech pros in our community with native advertising, as a Vendor Expert, and more.

    Join & Write a Comment

    Having worked on larger scale sites, we found out that you are bound to look at more scalable solutions to integrating widgets, code snippets or complete applications and mesh them into functional sites, in any given composition. To share some of…
    This article discusses the difference between strict equality operator and equality operator in JavaScript. The Need: Because JavaScript performs an implicit type conversion when performing comparisons, we have to take this into account when wri…
    In this tutorial viewers will learn how to embed an audio file in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: : The declaration should display (CODE) HTML5 is supported by the most recent versions of all major browsers…
    The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

    745 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    18 Experts available now in Live!

    Get 1:1 Help Now