javascript - Adding custom social share button using HTML & JS -
i have 1 page html site generate random quote list using following javascript code:
//satirical punch line script- javascriptkit.com (text colin lingle) //visit javascript kit (http://javascriptkit.com) script //credit must stay intact use quotes = new array(); quotes[0]="warning: dates in calendar closer appear."; quotes[1]="daddy, why doesn't magnet pick floppy disk?" quotes[2]="give me ambiguity or give me else." quotes[3]="i.r.s.: we've got takes take you've got!" quotes[4]="we born naked, wet , hungry. things worse." quotes[5]="pentiums melt in pc, not in hand." quotes[6]="suicidal twin kills sister mistake!" quotes[7]="did see lost carrier?" quotes[8]="make idiot proof , make better idiot." quotes[9]="i'm not complete idiot, parts missing!" quotes[10]="he laughs last thinks slowest!" quotes[11]="always remember you're unique, else." quotes[12]="save whales, collect whole set" quotes[13]="a flashlight case holding dead batteries." quotes[14]="lottery: tax on people bad @ math." quotes[15]="there's blood in caffeine system." quotes[16]="artificial intelligence beats real stupidity." quotes[17]="hard work has future payoff. laziness pays off now." quotes[18]="friends move. real friends move bodies." quotes[19]="i wont rise occaasion, i'll slide on it." function randomdisplay(){ randomquote=quotes[math.floor(math.random()*quotes.length)] document.scriptform.scriptinput.value=randomquote } settimeout("randomdisplay()",100)
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script> <form name="scriptform"><input name="scriptinput" size=200 style="border-width:5px solid black;font:arial"> <input type="button" value="next" onclick="randomdisplay()"></form>
i need add custom social sharing buttons (ex. facebook, twitter). share current quote textbox.
Comments
Post a Comment