Random Order Content using JavaScript

This project Random Order Content was created using HTML and JavaScript. This kind of system lets you shuffle the display order of your regular content on your page. Just wrap it with the participating contents each inside a
tags with a CSS class name, and this will scramble or will shuffle the order in which contents are shown on your page from top to bottom. Also, you can make a multiple "groups" of a random order content. Each group will shuffle independently. Check the LIVE DEMO below.

Directions:

First, Kindly add this code below to the HEAD section of your page. .random_class body .random_title { display:none; } p { color:#00f; } Second, add this code below to the BODY section of your page to see how to apply the script on your page.

Random Source Code 1

Random Source Code 2

The classname should follow the syntax:
class="random_title groupX" Where the "X" is an integer that should be shared to all content within the same group. This work, there are two kinds of content, the Random Source Code 1 and the Random Source Code 2, and it will shuffle their display order when shown. Lastly, at the end of your page, just add this code below to call the script.

Output

Result Download the full source code to have this kind of project and try to debug this code. Thank you.

Add new comment