I like this idea, but I find pretty annoying to slide between sections all
over again, if the whole page is up there, just use the fades. That's my
opinion. Here it's some code I could thought about.

Oh btw, you should add the # symbol in your links, it's an accessibility
issue :)
<a href="#portfolio">portfolio</a>


$('#navbar a').click(function(){
  var $this = $(this);
  var $target = $($this.attr('href'));
  var $container = $('#contentContainer');
  var $content = $('#content');

  if( !$cont.is('.opened') ) {
    $('div',$content).hide();
    $container.animate({ height: 650 },'slow', function(){
      $container.addClass('opened');
      $target.fadeIn();
    });
  } else {
    if( $target.is(':visible') ) {
      $target.hide();
      $container.animate({ height: 210 },'slow', function(){
        $container.removeClass('opened');
      });
    } else {
      $target.fadeIn();
    }
  }

  return false;
});



On 9/7/07, Andy Matthews <[EMAIL PROTECTED]> wrote:
>
>  I just relaunched my freelance website:
>
> http://www.commadelimited.com/
>
> There's a code block in there that I'm not happy with. It works, but it's
> redundant and ugly. I'm wondering if you guys can look at it and let me know
> where I could improve it.
>
> The code can be found in http://www.commadelimited.com/includes/site.js .
> It's the block labeled
>
> // navigation trigger
> $('#navbar a').each(function() {
>
> Thanks in advance. I'm hoping I can learn more about higher level jQuery
> stuff by your feedback.
>
> * ____________________________________
>
> Andy Matthews
> *Senior ColdFusion Developer
>
> Office:  877.707.5467 x747
> Direct:  615.627.9747
> Fax:  615.467.6249
> [EMAIL PROTECTED]
> www.dealerskins.com
>
>
>


-- 
Joan Piedra  ||  Frontend web developer
http://www.justaquit.com/  ||  http://www.joanpiedra.com/

Reply via email to