Here i am trying to open and get the contents of one div to target div on-click on a href. Here i have table where i have hrefs which has the link to div ids, and i have an
Try this code in jquery
$(document).ready(function(){ $("a").click(function(){ var id=$(this).attr('href'); var value=$(id).text(); $(".target").text(value); }); });