Hey, I'm kinda new to web design. I know basic HTML and CSS but I'm having trouble with the more advanced stuff. I want to make my thumbnail image links shuffle each time the page is refreshed, like on this website: www.thestupidstation.com On that site, every time you click on something (like the previous/next buttons on the specific topic pages), their thumbnail links on the side changes or shuffles. How can I make my site do that?
if you are using wordpress, you can use random widget if you are using plain php, then you can put it within a random array and display it there Regards
I am not using wordpress...i'm using Dreamweaver to construct the website using HTML and CSS. I don't understand PHP...at all.
<script type="text/javascript"> var textarray = [ "hi", "hello", "how r u", "where r u" // No comma after last entry ]; function RndText() { var rannum= Math.floor(Math.random()*textarray.length); document.getElementById('ShowText').innerHTML=textarray[rannum]; } onload = function() { RndText(); } var inter = setInterval(function() { RndText(); }, 2000); </script> PHP: this will be enough for you - its javascript put this at the relevant section on webpage
Thank you...do I need to change any of that text above and replace it with something else..if so , what?
So if I want a bunch of image links to shuffle, I put <a href="whatever.html"><img src="image.gif" /></a> in the place of hi, hello, etc..? and I put this script in the head element or in the div where those links are contained? I know I ask a lot of questions lol..just want to make sure I am understanding correctly.
instead of asking, the best way is to implement - try , change, try , change, until you get what you want. Thats how i learned everything i ever knew.
Yeah, I realize that. It would be nice to know specifics, though..so I'm not pasting that code in every possible place in my coding. A more thorough explanation is always more helpful.