Explode/implode Text On Reveal/hide(and Not Expand But Recompose Page Back To Normal)
I found several different pieces of code, but I do not know how to put them altogether so they work together. Please help. Reveals/Hides part of text: Show more show less with JQu
Solution 1:
The space you want Opened up and swept away should occur automatically as default DOM Manipulation "Cleans up after itself" in a way. This code should do exactly what you need :)
EDIT I've changed this code to work for any jquery/jquery UI. Remove the display none from the text and use this code.
<ahref="javascript:;"id="openLink">Read More</a><pid="text" >lorem ipsum dolowhatever this is</p><scripttype="text/javascript">
$(document).ready(function(){
$("#text").hide();
$("#openLink").toggle(function () {
$("#text").show('explode', {}, 600);
$("#openLink").text("Read Less");
}, function () {
$("#text").hide('explode', {}, 600);
$("#openLink").text("Read More");
});
});
</script>
Post a Comment for "Explode/implode Text On Reveal/hide(and Not Expand But Recompose Page Back To Normal)"