tags:

views:

447

answers:

3

I'm trying to build a site like http://justinouellette.com/. The only problem here is I'm confused with the code. I'd like to use JQuery instead of MooTools.

Can somebody here be an angel and write up a demo? I'd like to be able to switch between frames using hyperlinks. A frame would be a class.

Thanks!

A: 

As far as I understand your question, what you want is a Carousel, there's a great JQuery Plugin called JCarousel that you can use. Demo Here...

Soufiane Hassou
That's not quite what I'm looking for. Did you take a look at the site I provided as a live closed-source demo?
Alec A.
using JCarousel, you can do that. Obviously, you'll need to do some work by yourself.
Soufiane Hassou
+1  A: 

The jQuery plugin Cycle can do this if you specify elements (like the arrow images) for the next and prev option settings.

Someone else that asked a question recently was achieved a similar effect on their site (which you can see by following the link in their question) with EasySlider 1.7.

As far as occupying the entire window, you can see in Firebug that the sample site has bound a function to window.resize, refigure(), which sets the height and width of each frame to the size of the window. Translating that to jQuery should be possible - perhaps something like this:

$(document).ready(function() {
    $(window).resize(refigure());
});

and

function refigure() {
    $('.frame').height($(window).height);
    $('.frame').width($(window).width);
}

The original code's refigure method is setting the dimensions of several additional elements - I think to accommodate the particular requirements of that page and possibly the code module performing the transition animations.

Jeff Sternal
Here's the deal, I'd like it to be like this.I'd have various classes, be it 'frame1', 'frame2', and 'frame3'.'frame2' and 'frame3' would be hidden. Upon clicking a link (eg. 'next'), it'll just slide over to 'frame 2'.Just like http://justinouellette.com.Sorry for being rude, I came across that link you posted and didn't understand how to make it slide the entire page.
Alec A.
No offense taken, though I think that the business of sliding the whole page is a css issue, like o.k.w. suggests. If I have time, I'll see if I can confirm that suspicion by looking more closely at ouellette's site.
Jeff Sternal
@Jeff: +1 for the effort :)
o.k.w
A: 

This is the closest out-of-the-box Jquery plugin I can find that's close to your needs: Step Carousel Viewer v1.8

The details are on that page, here is what you might be interested (each frame/panel is a css class):

Sample Step Carousel HTML:

<div id="mygallery" class="stepcarousel">
  <div class="belt">

    <div class="panel">
      Panel 1 content here...
    </div>

    <div class="panel">
      Panel 2 content here...
    </div>

    <div class="panel">
      Panel 3 content here...
    </div>

  </div>
</div>

The tricky part is how to have each panel occupy the whole page while the stepping buttons float over them. More of a CSS issue I will say. Good luck!

o.k.w