ed1t
ed1t

Reputation: 8709

horizontal scroll - like github

Is there a javascript library which lets me do the horizontal scrolls effect kind like github does when you click on a file/folder.

Preferrably jQuery plugin.

thanks

Upvotes: 0

Views: 913

Answers (3)

Nate Lampton
Nate Lampton

Reputation: 349

For a more in-depth answer, GitHub actually wrote about how they've assembled their directory structure on their blog.

But yes they're using jQuery for the actual effects themselves. They mention using slideTo() in that post, but in the end it's really just an $.animate() effect.

Upvotes: 2

eolsson
eolsson

Reputation: 12727

Looking at the source for github, it seems they use jQuery.animate to slide the content to the left.

$("#id").animate({
    marginLeft: "-1200px"
});

Example on jsfiddle

Upvotes: 5

Xasz
Xasz

Reputation: 101

maybe you want to look into jQuery.ScrollTo, a jQuery plugin really usefull for this kind of effects.

You could have like github a div with a overflow:hidden containing your slides or pages and above the same kind of links than in the jQuery.ScrollTo example page.

Upvotes: 0

Related Questions