Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

image display random

Posted on 2015-01-28
4
Medium Priority
?
108 Views
Last Modified: 2015-01-28
http://jsfiddle.net/sevensnake/sx9rw924/

is there a way to have multiply images display like the squares. It would be a random image each time it display.
0
Comment
Question by:Seven price
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 44

Accepted Solution

by:
Rainer Jeschor earned 2000 total points
ID: 40575983
Hi,
here we go:
http://jsfiddle.net/EE_RainerJ/44b7y3q8/

I used an array of images - if you have numbered images from 1 to xx on your server you might generate the src file name dynamically.

HTH
Rainer
0
 
LVL 9

Author Comment

by:Seven price
ID: 40576007
Thanks, ok can I decide if I want them in a border surrounded in a div and they just appear in the div. also it stops running, it is not running continously
0
 
LVL 44

Expert Comment

by:Rainer Jeschor
ID: 40576073
Hi,
I have a counter to stop after 3 rounds for easier debugging, so this can easily be removed.
The div should also be no problem in general - it is just about getting the correct height and width.
Do your images have all the same heigth and width?
0
 
LVL 9

Author Closing Comment

by:Seven price
ID: 40576098
Thanks
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

There are a couple ways to attach a JavaScript function to dynamically created elements. You can make a new script for each element as it’s created or you can use delegation. Delegation allows a single script that is added at page creation to mat…
Introduction Knockoutjs (Knockout) is a JavaScript framework (Model View ViewModel or MVVM framework).   The main ideology behind Knockout is to control from JavaScript how a page looks whilst creating an engaging user experience in the least …
The viewer will learn how to dynamically set the form action using jQuery.
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…
Suggested Courses

636 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