12-16-2008, 01:15 PM
12-16-2008, 01:23 PM
Its just an combo of $.get() and the slide effect, I know how it works 
I don't think that its an plugin.

I don't think that its an plugin.
12-16-2008, 01:30 PM
Could you show me how it works? I'd really love to use this. 

12-16-2008, 01:35 PM
If Jonny allows me to do so...Get on IRC. I will explain it.
12-16-2008, 04:21 PM
Sure, you can do that.
12-16-2008, 05:34 PM
Code:
function gup( name )
{
name = name.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]");
var regexS = "[\\?&]"+name+"=([^&#]*)";
var regex = new RegExp( regexS );
var results = regex.exec( window.location.href );
if( results == null )
return "";
else
return results[1];
}
var page2;
var old;
function page(url) {
old = page2;
if(old == null) {
old = "home";
}
page2 = url;
if(page != old) {
document.getElementById("nav_"+old).setAttribute("class", "none");
$.get(url+".html", function(data) {
document.getElementById("nav_"+page2).setAttribute("class", "active");
if(document.getElementById("content").style.display == "none") {
document.getElementById("content").innerHTML = '<div class="maintxt">'+data+'</div>';
$("#content").slideDown(1000);
}
else {
$("#content").slideUp(1000, function() {
document.getElementById("content").innerHTML = '<div class="maintxt">'+data+'</div>';
$("#content").slideDown(1000);
});
}
});
}
}
$(window).load(function () {
var urlpage = gup("page");
if(urlpage != "") {
page(urlpage);
}
else {
page('home');
}
});OK. I got that into the head of my page. But how do I change it to work with my page? Cause, I tried but it didn't work right.

12-16-2008, 05:45 PM
Kevin, that code isn't really general code. It's very specific to the THT website and what it needs. I'd suggest you look at this:
http://docs.jquery.com/Effects/slideTogg...edcallback
http://docs.jquery.com/Effects/slideTogg...edcallback
12-16-2008, 05:57 PM
Thanks, Jonny. I'll take a look at that. 

02-22-2009, 05:35 PM
Hmmmmm
09-28-2011, 04:18 AM
Can you teach me how to use? I really want to use this...
--------------------------------------
dexter seasons 1-5 dvd boxset
the office seasons 1-7
--------------------------------------
dexter seasons 1-5 dvd boxset
the office seasons 1-7
