This hides div.extended then creates a button that toggles its text and div.extended's visibility.
While the below works, I was wondering if there was a more concise way of writing this code.
(function() {
var extended = $('.extended').hide();
$('<button></button>', {
text: 'Read more'
}).appendTo('.intro')
.on('click', function(){
extended.slideToggle();
}).toggle(
function(){
$(this).text('Read Less')
},
function(){
$(this).text('Read More')
});
})()