I want to display a div on each button click and also want to hide the other all divs how I can do it.
HTML
Add a class to all the divs u want to show or hide eg:
<div id=a class="hide" style="display:none">1</diV>
And then add the following statement to each onclick function
$('.hide').css('display','none'); /* Replace .hide with whatever class name u have chosen*/
To see the answer in action: http://jsfiddle.net/6UcDR/1/