EasyUI Forum

General Category => EasyUI for jQuery => Topic started by: Opan Mustopah on November 17, 2014, 01:04:02 AM



Title: how to make tabs sortable like jquery ui?
Post by: Opan Mustopah on November 17, 2014, 01:04:02 AM
hello again,

i have a simple question about tabs plugin. Because easyui based on jquery, it is possible to make it (in this case tabs plugin) draggable or sortable in jquery ui.

here is an example : http://jqueryui.com/tabs/#sortable

we can easily move one tab to another position.

thanks in advance


Title: Re: how to make tabs sortable like jquery ui?
Post by: aswzen on November 17, 2014, 08:00:56 PM
using jquery you can sort some div before they are rendered in-to tabs..
follow this link
http://stackoverflow.com/questions/18847712/sort-divs-bases-on-elements-data-attribute

Code:
<div id="TABS_ME" style="width:500px;height:250px">
        <div title="A" >
            A
        </div>
        <div title="D" >
            D
        </div>
        <div title="C" >
            C
        </div>
</div>

Code:
<script>

    //YOUR LOGIC TO SORT THE DIV

    $('#TABS_ME').tabs();
</script>


Title: Re: how to make tabs sortable like jquery ui?
Post by: Opan Mustopah on November 18, 2014, 02:21:18 AM
i think not like this sorry, but its like drag n drop in tabs. in example i provide it very easy to sort the tab by drag n drop to a new position.