Treehouse: Grow your CSS skills. Land your dream job.

Sliding Tab (Menu links jumps to page)

  • # May 16, 2012 at 12:10 pm

    Hi guys,

    I need your javascript expertise on a current project I’m working on. I added a Sliding tab menu but I’m having problem because the menu, when clicked jumps to a certain part of the page. I tried to refactor the error but I can’t fix it (since i’m not that good with JS anyway). Here’s the link of the page I’m working on

    BTW, I’m using for this one.

    Hope you can help me guys! Thank you very much :)


    # May 17, 2012 at 4:59 am
    //Scroll to the correct panel, the panel id is grabbed from the href attribute of the anchor
    $('#mask').scrollTo($(this.href), 800);
    # May 17, 2012 at 1:06 pm

    Hi Hompimpa,

    Thanks for your reply! I tried to remove that whole line of code but when I clicked on the next menu the content gets cut off. Hope you can help me.

    # May 17, 2012 at 11:02 pm

    Error: Problem at line 8 character 19: Missing radix parameter (what is this? :p)

    $('#panel').width(parseInt($('#mask').width() * $('#panel div').length));

    Work fine for me:
    Oh, and also, put the JQuery library before scrollTo.js

    # May 18, 2012 at 2:42 pm

    Wow!!!! You got it working! Thanks so much for the help, I really appreciate it! Will look into your code now. Thanks again, Hompimpa :D

Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.