mapapapa

Fundraising campaign by PAVAN MAHI
  • £40.00
    Donated So Far
Help this ongoing fundraising campaign by making a donation and spreading the word.
Show more
Show less

andom Content (from DIVs) script- by JavaScript Kit (www.kit.com)

* This notice must stay intact for usage

* Visit JavaScript Kit at http://www.kit.com/ for this script and 100s more

***********************************************/

if (document.getElementById)

document.documentElement.className = 'jsclass'; //hide content for DOM capable browsers

var randomcontentdisplay={

divholders:new Object(),

masterclass: "randomcontent",

init:function(){

if (!document.getElementById)

return

var alldivs=document.getElementsByTagName("div")

var randomcontentsearch=new RegExp(this.masterclass+"\\s+(group\\d+)", "i") //check for CSS class="randomcontent groupX" (x=integer)

for (var i=0; i

if (randomcontentsearch.test(alldivs[i].className)){

if (typeof this.divholders[RegExp.$1]=="undefined") //if array to hold this group of divs doesn't exist yet

this.divholders[RegExp.$1]=new Array() //create array first

this.divholders[RegExp.$1].push(alldivs[i]) //add this div to the array

}

}

this.showone()

},

showone:function(){

for (group in this.divholders){ //loop thru each array within object

var chosenOne=Math.floor(Math.random()*this.divholders[group].length) //randomly pick one entry from array

this.divholders[group][chosenOne].style.display="block" //display content corresponding to the chosen entry

}

}

}

Organizer

  • PAVAN MAHI
  •  
  • Campaign Owner

Donors

  • Anonymous
  • Donated on Feb 02, 2017
Amount Hidden

No updates for this campaign just yet

Donors & Comments

1 donors
  • Anonymous
  • Donated on Feb 02, 2017
Amount Hidden

Followers

0 followers
No Followers Just Yet...
£40.00
Donated So Far

Help this ongoing fundraising campaign by making a donation and spreading the word.

Not Ready to Donate?

Did you know a 10 second Facebook share raises an average of £25?

Share on Facebook