Reputation: 1683
my website consists only of one page where all other pages are loaded in a div, what i want to do is to create breadcrumbs to keep track of pages loaded inside the div, all the solutions i found in the internet works only for pages loaded in the whole window, so any one have better idea? my page:
<div id="nav" class="mmenu" style="float: left; position: fixed;">
<ul type="none">
<li><a class="upper" id="1" style="border-top-left-radius: 6px; border-top-right-radius: 6px; background-image:url('menu icons/user-blue.gif'); background-repeat: no-repeat; background-position: left; background-position-x: 5px;" target="collabsoft" href= "ProfilePage.php?property_variable=mine">My Profile</a></li>
<li><a id="2" style="background-image:url('menu icons/comments.png'); background-repeat: no-repeat; background-position: left; background-position-x: 5px;" target="collabsoft" href= "viewMessages.php">Messages</a></li>
<li><a id="3" style="background-image:url('menu icons/newspaper.gif'); background-repeat: no-repeat; background-position: left; background-position-x: 5px;" target="collabsoft" href= "userHomepage.php">My Conferences</a></li>
<li><a id="4" style="background-image:url('menu icons/pageflip.gif'); background-repeat: no-repeat; background-position: left;background-position-x: 2px;" target="collabsoft" href= "availableConferences2.php">Conferences</a></li>
<li><a id="5" style="background-image:url('menu icons/users.gif'); background-repeat: no-repeat; background-position: left; background-position-x: 5px;" target="collabsoft" href= "incomingRequests.php">Requests</a></li>
<li><a id="6" style="background-image:url('menu icons/book.gif'); background-repeat: no-repeat; background-position: left;background-position-x: 5px;" target="collabsoft" href= "viewNews.php" >News</a></li>
<li><a class="lower" id="7" style="border-bottom-left-radius: 6px; border-bottom-right-radius: 6px; background-image:url('menu icons/gear.gif'); background-repeat: no-repeat; background-position: left;background-position-x: 5px;" target="collabsoft" href= "generalOptions.php" >Options</a></li>
</ul>
</div>
<table id="collabsoft_table" style="border: 0px;">
<tr>
<td id="collabsoft_td"style="border:0px;">
<div scrolling="no" id="collabsoft" name="collabsoft" style="color: #003366; left:200px; display:none;position: absolute; border: 5px #1f487c solid; width: fit-content; height: fit-content; border-radius: 10px;"></div>
</td>
</tr>
</table>
function used to load pages in the div:
$("#nav a").click(function(event) {
event.preventDefault();
var page = $(this).attr("href");
$("#collabsoft").slideUp("500",function() {
$("#collabsoft").load(page,function() {
$(this).slideDown(500);
});
});
return false;
});
Upvotes: 1
Views: 902
Reputation: 336
Yes, jQuery bbq is awesome I guess. But in my case recently, I used jQuery hashchange event.. it easy, light and simply did the work for me.
I haven't used breadcrumb, but for the pageheaders, I used $("#pageheader").text("header for div1/div2");
while loading the respective div with jQuery.
Upvotes: 0
Reputation: 2973
Use browser history widgets like jQuery bbq to keep track of the pages. This way you have both back button enabled and you'll be able to keep track of all the pages that the user visited. Be warned that is has a bit of a steep learning curve.
Upvotes: 2