"More content" links with CSS and the YUI library

The lyrics examples below have been marked up with embedded DIVs with the class "more". The script using the YUI library will hide each of these sections when the page is loading and provide a "more" link that will show them when the user clicks the link. Furthermore, there'll be a "less" link after the text to shorten the text passage again.

The sections inside the DIVs with the class "more" are hidden by adding a class to a parent element that needs to have the ID "content". This class is called "dynamic". You can change all of the class names and the text of the "more" link by changing the paramaters in the script:


  hideClass:'dynamic',
  moreContentClass:'more',
  hideLinkClass:'hide',
  moreLabel:'more...',
  lessLabel:'...less',

Enjoy, Chris

EVERYBODY KNOWS (from the album 'I'M YOUR MAN') Everybody knows that the dice are loaded Everybody rolls with their fingers crossed Everybody knows that the war is over Everybody knows the good guys lost
Everybody knows the fight was fixed The poor stay poor, the rich get rich That's how it goes Everybody knows Everybody knows that the boat is leaking Everybody knows that the captain lied Everybody got this broken feeling Like their father or their dog just died Everybody talking to their pockets Everybody wants a box of chocolates And a long stem rose Everybody knows Everybody knows that you love me baby Everybody knows that you really do Everybody knows that you've been faithful Ah give or take a night or two Everybody knows you've been discreet But there were so many people you just had to meet Without your clothes And everybody knows Everybody knows, everybody knows That's how it goes Everybody knows Everybody knows, everybody knows That's how it goes Everybody knows And everybody knows that it's now or never Everybody knows that it's me or you And everybody knows that you live forever Ah when you've done a line or two Everybody knows the deal is rotten Old Black Joe's still pickin' cotton For your ribbons and bows And everybody knows And everybody knows that the Plague is coming Everybody knows that it's moving fast Everybody knows that the naked man and woman Are just a shining artifact of the past Everybody knows the scene is dead But there's gonna be a meter on your bed That will disclose What everybody knows And everybody knows that you're in trouble Everybody knows what you've been through From the bloody cross on top of Calvary To the beach of Malibu Everybody knows it's coming apart Take one last look at this Sacred Heart Before it blows And everybody knows Everybody knows, everybody knows That's how it goes Everybody knows Oh everybody knows, everybody knows That's how it goes Everybody knows Everybody knows
"Lou Reed Beginning Of A Great Adventure lyrics" It might be fun to have a kid that I could kick around A little me to fill up with my thoughts A little me or he or she to fill up with my dreams A way of saying life is not a loss I’d keep the tyke away from school and tutor him myself Keep him from the poison of the crowd But then again pristine isolation might not be the best idea It’s not good trying to immortalize yourself Beginning of a great adventure Beginning of a great adventure
Why stop at one, I might have ten, a regular tv brood I’d breed a little liberal army in the wood Just like these redneck lunatics I see at the local bar With their tribe of mutant inbred piglets with cloven hooves I’d teach ’em how to plant a bomb, start a fire, play guitar And if they catch a hunter, shoot him in the nuts I’d try to be as progressive as I could possibly be As long as I don’t have to try too much Beginning of a great adventure Beginning of a great adventure Susie, jesus, bogart, sam, leslie, jill and jeff Rita, winny, andy, fran and jet Boris, bono, lucy, ethel, bunny, reg and tom That’s a lot of names to try not to forget Carrie, marlon, mo and steve, la rue and jerry lee Eggplant, rufus, dummy, star and the glob I’d need a damn computer to keep track of all these names I hope this baby thing don’t go too far I hope it’s true what my wife said to me I hope it’s true what my wife said to me, hey I hope it’s true what my wife said to me She says, baby, it’s the beginning of a great adventure Babe, beginning of a great adventure Take a look It might be fun to have a kid that I could kick around Create in my own image like a god I’d raise my own pallbearers to carry me to my grave And keep me company when I’m a wizened toothless clod Some gibbering old fool sitting all alone drooling on his shirt Some senile old fart playing in the dirt It might be fun to have a kid I could pass something on to Something better than rage, pain, anger and hurt I hope it’s true what my wife said to me I hope it’s true what my wife said to me I hope it’s true what my wife said to me She says, lou, it’s the beginning of a great adventure Lou, lou, lou, beginning of a great adventure She says, babe, how you call your lover boy Sylvia, quite you call your lover man

Digg this | Add to deli.cio.us | Technorati