Trying to pick an image from random
Okay, so I have a parent div that contains nothing but images. I want to select one of these images at random to display. I have display: none for css, so I am using the show() from jQuery. I'm using the DatePicker plugin to grab a random date. I know that the issue is not with the show() and selectors I am using as I isolated them and all the images displayed. Here is my code:
The Images div has three images that are linked properly and will display properly if display: none is removed or the show() is used. I'm sure it's something really simple I just can't figure it out.
var count = $("* > #Images").length;
var randomNumber = Math.round(Math.random() * count * DatePickerGetDate);
First I'm wondering if you are loading all images?
That wouldn't be efficient, wouldn't be smart.
So then, I'm thinking maybe they could have a jQuery forum...
I don't know, I'm just a little disappointed, just like when someone posts PHP code here too.
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)