When I did that the 2nd <div> was shown but nothing else!!
I couldn't understand what you mean by this sentence! Anyway, you have to define an Id for each div, then you can call their id from anywhere that you like within your current, or maybe children or parent documents!
Then you can get the Id by "document.getElementById('yourId')" and do what you want.