You will recieve your password to this address. Address is not made public.

Your preferred username that is used when logging in.

jQuery scrollable tabs -- disable scrolling of an element inside the div Created Jun 18, 2009

This thread is solved

Views: 12524     Replies: 13     Last reply Oct 26, 2011  
You must login first before you can use this feature

hunzolo

Posts: 5

Registered:
Jun 18, 2009

jQuery scrollable tabs -- disable scrolling of an element inside the div

Posted: Jun 18, 2009

Hi!

I made a tab-system with the help of jQuery tools (the tabs + scrolling them) and an addon called Infusion (making tabs sortable by dragging). I have one final function to add: The first tab is supposed to stay in one place. It's called the General tab where the settings will be stored on the website. The problem is that it's inside the same div as the other tabs so that jQuery can convert it into a tab. The problem comes after adding the scroll feature --> the general tab scrolls with the others. I tried several methods ( position: fixed, adding divs inside, etc.) but they all interfered with the previously written lines. Is there a way to "remove/disable" the element inside the list, so that it still appears as a tab but won't scroll?? Here's the actual code:

note: I've removed the "a" link tags from the tabs when I copied the code!

<!-- place of scroll back button-->
...a class="prev"> .../a>

<div class="scrollable">

<!-- tabs -->
<ul class="tabs">

<!-- this is the tab that should stay in place -->
<li class="fixed">General .../li>
<!-- class movable = draggable objects -->
<li class="movable">Page 1 .../li> <li class="movable">Page 2 .../li> <li class="movable">Page 3 .../li> <li class="movable">Page 4 .../li> <li class="movable">Page 5 .../li> <li class="movable">Page 6 .../li> <li class="movable">Page 7 .../li> <li class="movable">Page 8 .../li> <li class="movable">Page 9 .../li> <li class="movable">Page 10 .../li>
</div>

<!-- place of scroll forward button -->
...a class="next"> .../a>

<!-- panes -->
<div class="panes">
<div>This is the content of the General tab...<br/>
This tab can't be <i>dragged or scrolled</i> !</div>
<div>This is the content of the Page 1 tab...</div>
<div>This is the content of the Page 2 tab...</div>
<div>This is the content of the Page 3 tab...</div>
<div>This is the content of the Page 4 tab...</div>
<div>This is the content of the Page 5 tab...</div>
<div>This is the content of the Page 6 tab...</div>
<div>This is the content of the Page 7 tab...</div>
<div>This is the content of the Page 8 tab...</div>
<div>This is the content of the Page 9 tab...</div>
<div>This is the content of the Page 10 tab...</div>
</div>

<script language="javascript" type="text/javascript">

// activate tabs
$(function() {
$("ul.tabs").tabs("div.panes > div");
});

// enable scrolling
$(function() {
$("div.scrollable").scrollable({
items: 'ul.tabs',
clickable: false,
size: 5,
});
});

</script>

hunzolo

Posts: 5

Registered:
Jun 18, 2009

solved! (? hopefully)

Posted: Jun 18, 2009

Reply to: jQuery scrollable tabs -- disable scrolling of an element inside the div, from hunzolo
I think I solved it. Just needed to nest another list + some CSS tweaking!

<!-- tabs -->
<ul class="tabs">

<!-- not scrollable -->
  • General

  • <div class="scrollable">

    <!-- scrollable items -->
    <ul class="items">

    <li class="movable">Page 1 <li class="movable">Page 2 <li class="movable">Page 3 <li class="movable">Page 4 <li class="movable">Page 5 <li class="movable">Page 6 <li class="movable">Page 7 <li class="movable">Page 8 <li class="movable">Page 9 <li class="movable">Page 10

    </div>


    stargate
    The whole world is a Beta Site

    Posts: 6

    Registered:
    Jun 17, 2009

    soure code

    Posted: Jun 18, 2009

    Reply to: solved! (? hopefully), from hunzolo
    Do you have the complete source code. Because I am going nuts trying to something like this

    http://www.uphigh.org/tab/index.html

    But instead of hovering the next or pervious button you have do do a click.

    Much help would be appreciated

    Thanks...

    hunzolo

    Posts: 5

    Registered:
    Jun 18, 2009

    » soure code

    Posted: Jun 19, 2009

    Reply to: soure code, from stargate
    Yes, I have the files. It works nicely in Firefox and Safari (didn't test with IE).
    How can I get them to you?

    gsxawd99

    Posts: 19

    Registered:
    Jul 10, 2009

    trying this also...

    Posted: Jul 10, 2009

    Reply to: » soure code, from hunzolo
    if you could email me your souce code for my benefit, i would greatly appreciate it! d.simoneau@me.com

    bbb

    Posts: 2

    Registered:
    Jan 4, 2010

    » trying this also...

    Posted: Jan 4, 2010

    Reply to: trying this also..., from gsxawd99
    Hi,

    you got the solution for adding scrollbar to the jQuery tabs,if yes please provide the solution.

    bbb

    Posts: 2

    Registered:
    Jan 4, 2010

    » » soure code

    Posted: Jan 4, 2010

    Reply to: » soure code, from hunzolo
    Hi,

    i want to give scrolling feature to the jQuery tabs, somebody gave some URL for adding scrollbar to the jQuery tabs that ishttp://www.uphigh.org/tab/index.html but this site is not working. please give some solution on this.

    mona02

    Posts: 2

    Registered:
    Jul 11, 2009

    I also want to make scrolling tabs using jquery

    Posted: Jul 11, 2009

    Reply to: jQuery scrollable tabs -- disable scrolling of an element inside the div, from hunzolo
    can you please send me your code of scrolling tabs

    hunzolo

    Posts: 5

    Registered:
    Jun 18, 2009

    source

    Posted: Jul 11, 2009

    Reply to: I also want to make scrolling tabs using jquery, from mona02
    I'm going to create a simple page with scrollable tabs and post it here today (hopefully) and you'll see how easy it is!

    vmr

    Posts: 6

    Registered:
    Oct 13, 2009

    Source Please ....

    Posted: Oct 13, 2009

    Reply to: source, from hunzolo
    hunzolo,

    I am in need of the same feature. Can you please post the solution to the scrollable tabs feature. Thanks a bunch.

    dabefesi

    Posts: 2

    Registered:
    Oct 22, 2009

    » source

    Posted: Oct 23, 2009

    Reply to: source, from hunzolo
    Yeh i'm in need to ;) Can you post the code, or an url

    SebFr

    Posts: 1

    Registered:
    Dec 14, 2009

    solution ?

    Posted: Dec 14, 2009

    Reply to: » source, from dabefesi
    Anyone has a solution to scrollable tabs please ?

    gwuff

    Posts: 5

    Registered:
    Oct 19, 2011

    » solution ?

    Posted: Oct 26, 2011

    Reply to: solution ?, from SebFr
    I need them too! @hunzolo why did you never ever posted your solution here as you said :) ? Would be so cool of you!