Current time: 02-07-2012, 11:08 AM Hello There, Guest! (LoginRegister)

Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
jQuery Slide
12-16-2008, 01:15 PM
Post: #1
jQuery Slide
I was wondering what jQuery plugin you were using for the sliding effects are your homepage. I'd love to have that on my site! Cool

Kevin Mark - TheHostingTool Lead Developer
Visit this user's website Find all posts by this user
Quote this message in a reply
12-16-2008, 01:23 PM
Post: #2
RE: jQuery Slide
Its just an combo of $.get() and the slide effect, I know how it works Wink
I don't think that its an plugin.

Jimmie Lin - Community Manager & THT.Next Developer
Visit this user's website Find all posts by this user
Quote this message in a reply
12-16-2008, 01:30 PM
Post: #3
RE: jQuery Slide
Could you show me how it works? I'd really love to use this. Big Grin

Kevin Mark - TheHostingTool Lead Developer
Visit this user's website Find all posts by this user
Quote this message in a reply
12-16-2008, 01:35 PM
Post: #4
RE: jQuery Slide
If Jonny allows me to do so...Get on IRC. I will explain it.

Jimmie Lin - Community Manager & THT.Next Developer
Visit this user's website Find all posts by this user
Quote this message in a reply
12-16-2008, 04:21 PM
Post: #5
RE: jQuery Slide
Sure, you can do that.

Jonny H - THT Main Developer & Founder
Find all posts by this user
Quote this message in a reply
12-16-2008, 05:34 PM
Post: #6
RE: jQuery Slide
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. Tongue

Kevin Mark - TheHostingTool Lead Developer
Visit this user's website Find all posts by this user
Quote this message in a reply
12-16-2008, 05:45 PM
Post: #7
RE: jQuery Slide
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

Jonny H - THT Main Developer & Founder
Find all posts by this user
Quote this message in a reply
12-16-2008, 05:57 PM
Post: #8
RE: jQuery Slide
Thanks, Jonny. I'll take a look at that. Big Grin

Kevin Mark - TheHostingTool Lead Developer
Visit this user's website Find all posts by this user
Quote this message in a reply
02-22-2009, 05:35 PM
Post: #9
RE: jQuery Slide
Hmmmmm
Find all posts by this user
Quote this message in a reply
09-28-2011, 04:18 AM
Post: #10
RE: jQuery Slide
Can you teach me how to use? I really want to use this...



--------------------------------------
dexter seasons 1-5 dvd boxset
the office seasons 1-7
Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)