DN0300 DN0300 - 8 months ago 20
Javascript Question

Loading a page in div using jquery and ajax

I am trying to open content into a div on click, I can't figure out where I am going wrong any help is much appriciate. Thank you


<li><a id="hrefid" href="#link">Link</a></li>

<div id="content"> </div>


$('#hrefid').on('click', function (e) {
var load = $(e.target).attr("href");
if(load == "#link") {
type: 'post',
url: "/page/test/272.html",
complete: function (event) {


Your intended operation is a GET operation as far as i understand, so instead of type: 'post' make it type: 'get'