I just thought to give you the reason why your solution did not work:
When $(document).ready()
is executed only the $('#topbar-show')
selector can find a matching element from the DOM. The #topbar-show
element has not been created yet.
To get past this problem, you may use live event bindings
$('#topbar-show').live('click',function(e){});
$('#topbar-hide').live('click',function(e){});
This is the most simple way to fix you solution. The rest of these answer go further to provide you a better solutions instead that do not modify the hopefully permanent id attribute.