Created
December 30, 2013 16:55
-
-
Save anonymous/8184675 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(document).ready(function() { | |
var home = $("#index"); | |
var vors = $("#vorstellung"); | |
var vorb = $("#vorbereitung"); | |
var aneig = $("#aneignung"); | |
var nachb = ("#nachbereitung"); | |
var esem = $("#eseminar"); | |
var webk = $("#webkonferenz"); | |
vors.click(function() { | |
var href = "vorstellung"; | |
getContent(href); | |
//testFunktion(href); | |
}); | |
//getContent --- URL aufrufen | |
function getContent(href) { | |
$.ajax({ | |
type : "POST", | |
url : href + ".html", | |
dataType : "html", | |
beforeSend : function(xhr) { | |
xhr.overrideMimeType("text/html; charset=ISO-8859-1"); | |
}, | |
success : parseHTML, | |
error : function() { | |
$("#content").html(href); | |
//$('#content').html("<h3 style='text-align: center;'>Es ist ein Fehler aufgetreten</h3>"); | |
} | |
}); | |
} | |
function parseHTML(html) { | |
//alert("JAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"); | |
content = $(html).filter("#content").text(); | |
$("#content").html(content); | |
} | |
function testFunktion(href) { | |
alert(href); | |
} | |
// SIDEBAR | |
$('#simple-menu').sidr(); | |
//ACTIVE | |
$('#sidr ul li a').click(function() { | |
$('#sidr ul li a').removeClass("active"); | |
$(this).addClass("active"); | |
}); | |
}); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment