Your really duplicate typical "Ajax" functionality, since many frameworks (like jQuery) have already abstracted it, and you are unlikely to do it better, I would give this snapshot. Do not reinvent the wheel.
You can find a great example here .
$("#links").load("/Main_Page #jq-p-Getting-Started li");
source
share