Beer
Vodka
rum
whiskey
how can you select beer ? or rum ? in jquery ? they are not surrounded by any html tags....
Personally, I'd wrap them in a then you can refer to them more easily. I'm using Russ Cam's filter, so props (and +1) to him
$(document).ready(function(){
$('body').contents().filter(function(){ return this.nodeType === 3 }).each(function(){
$(this).wrap('');
})
})
Then you can just use $('.text')
and selectors to access them more easily.