Last active
December 13, 2015 20:08
-
-
Save Ralphkay/4967514 to your computer and use it in GitHub Desktop.
Read More Link no ajax but very seamless and robust by Ralphkay---updated to a plugin
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
//this will work after you have input your jquery lib file. | |
//using classes allows you to implement it several times in your code. | |
//style the cursor of the readMoreLink with jquery or css | |
;(function(){$('.readMoreLink).css({'cursor':'pointer'}); | |
$('span.extraStory').hide(); | |
$('span.readMoreLink').click(function(){ | |
$(this).next('span').show(0,function(){ | |
$(this).prev('span.readMoreLink').hide(0);//callback function to remove the readMoreLink class | |
}); | |
});}()jquery) | |
//all is done and working just like facebook read more link. the number 0 makes everything seamlessly smooth. You even add effects to it. check jquery effects api documentation. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment