According to the OS user Italy in English:
here your profile: profile
here's your answer: answer
This is an example that you can use and adapt to your needs, if you access the link of the original author of the response you will notice a link still valid to jsfiddle with the functional example:
this example is HTML
<a href="#" id="button" class="button_style">Hide content</a>
<div id="hidden_content">Content</div>
with the help of jquery 1.8 or higher
$(document).ready(function() {
$("#button").toggle(function() {
$(this).text('Show Content');
}, function() {
$(this).text('Hide Content');
}).click(function(){
$("#hidden_content").animate({width: 'toggle'}, "slow");
});
});
To help the effect you are looking for, it is also done from CSS so
a {
display: block;
}
#hidden_content {
display: inline-block;
}