Hi everyone!
Let's get straight to the code:
$(".btn-slide").live("click", function(e){
if (e.preventDefault) {
e.preventDefault();
}
else {
e.returnValue = false;
}
//deo za dobavljanje odgovarajuce stranice
link = $(this).attr("href");
if($('#post-content').hasClass("active")){
$("#post-content").slideToggle("slow");
$('#post-content').toggleClass("active");
}
$('#post-content').load(link);
$("#post-content").slideToggle("slow");
$('#post-content').toggleClass("active");
$('#content').height($('#post-content').height()); return false;
});
So, I'm loading some contents into my current page/div on a click, but the content div just won't resize after the first call. But when I click the link again, it resizes... Solution anybody?