I am working on ajax and using .load() function to load the files/pages on click. Its working perfectly. I want to show the file/page location as well. Here is my html :
<ul class="nav nav-tabs nav-stacked">
<li role="presentation" ><a id="link" >
<span class="glyphicon glyphicon- phone"></span> Responsive Pages</a>
</li>
</ul>
<div id="loadfilename"></div>
<div id="loadpage"></div>
and I am using following javascript
$("#link").click(function(){
$("#loadpage").load("responsivepages.html");
$("#loadfilename").html(this.location.href);
});
Its not showing any thing. but if i use $("#loadfilename").html(window.location.href);
its shows my current url which is my home page. But I want to get location of clicked file/page.
Here is jsfiddle link https://jsfiddle.net/a52f50sy/