
Untitled
By: a guest on
Jun 26th, 2012 | syntax:
None | size: 1.16 KB | hits: 12 | expires: Never
jQuery(document).ready(function($) {
var $mainContent = $("#container"),
siteUrl = "http://" + top.location.host.toString(),
url = '';
$(document).delegate("a[href^='"+siteUrl+"']:not([href*=/wp-admin/]):not([href*=/wp-login.php]):not([href$=/feed/])", "click", function() {
location.hash = this.pathname;
return false;
});
$("#searchform").submit(function(e) {
location.hash = '?s=' + $("#s").val();
e.preventDefault();
});
$(window).bind('hashchange', function(){
url = window.location.hash.substring(1);
if (!url) {
return;
}
url = url + " #content";
$mainContent.html('<p>...</>').load(url, function() {
});
});
$(window).trigger('hashchange');
$(".btn").click(function(){
// Haal huidige selected class weg
$(".selected").removeClass("selected");
// Selecteer de section van deze btn
$(this).parents("section").addClass("selected");
// Plaats de content container in de geselecteerde section.
$("#container").appendTo( $('.selected'));
});
});