Created
May 30, 2013 09:32
-
-
Save bulv1ne/5676781 to your computer and use it in GitHub Desktop.
Read more
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if ($('.shorty').height() > 300) { | |
$('.shorty').css('max-height', '300px'); | |
$('.shorty').css('overflow', 'hidden'); | |
$('.shorty').after('<a href="#" class="readmore">Läs mer</a>'); | |
$('a.readmore').click(function() { | |
$('.shorty').css('max-height', ''); | |
$(this).remove(); | |
return false; | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment