javascript - Add container #id to .load('$(this).attr("href")); -


I want to draw only a specific device from that page which points to my link.

My links are formatted like this: & lt; A href = "about-smith.asp" class = "pic" & gt; Img & lt; / A & gt; Live ('click', function (e) {e.preventDefault (); $ ("# subsidebar" ). Load ($ (this) .attr ("href") + "#subcontent");});});

And I want to just #subcontent div about Drag from -smith.asp This content is displayed in the #subsidebar div, but it is the entire page.

You must add a location between the URL and the selector:

  $ ("# subsidebar"). Load ($ (this) .attr ("href" ) + "#subcontent"); ^    

Comments