I am trying to reload some content present inside the div but it can not happen like this. I am explaining my code below.
space.php:
<?php
require_once('header.php');
?>
<div>
<a href="#">Update the div!</a>
</div>
header.php:
<div class="collapse navbar-collapse navmenu loadListSpaceDiv" id="bs-example-navbar-collapse-1">
<?php
if(isset($_SESSION['vendor_id'])){ ?>
<ul class="dropdown-menu dropdown-menu-right">
<li><a href="<?php echo SITEURL.'vendor';?>">Dashboard</a></li>
<li><a href="<?php echo SITEURL;?>signout">Sign Out</a></li>
</ul>
<?php
}
?>
</div>
Here when user will click on anchor tag
the above div element should refresh/reload. I am explaining my code below.
$(function() {
$('a').click(function() {
$(".loadListSpaceDiv").load(document.URL + '.loadListSpaceDiv');
});
});
But its not working as per expected. Here I need when user will click on that a
tag the all div content will reload again.