How to get the header dynamically using jquery ?

How to get the header dynamically using jquery ?

Hi , i'm trying to get the header dynamically using jquery .I tried and its working fine but some problem is there i dont know where i did the mistake. Its working like when i click on the link i'm not getting heading in header tag but when i came back and open the same link its shows the header.Like this it is working.. can anyone help me to get the solution.


My code is here check this:http://jsfiddle.net/SP6ww/2/