Hello,
Is there a way to have tabs widgets with appery ?
http://jqueryui.com/tabs/
Thank you in advance.
Sophie.
Hello,
Is there a way to have tabs widgets with appery ?
http://jqueryui.com/tabs/
Thank you in advance.
Sophie.
Hi Sophie,
Sure. Add HTML component with the following layout:precode<div id="tabs">
<ul>
<li><a href="#tabs-1">Nunc tincidunt</a></li>
<li><a href="#tabs-2">Proin dolor</a></li>
<li><a href="#tabs-3">Aenean lacinia</a></li>
</ul>
<div id="tabs-1">
<p><strong>Click this tab again to close the content pane.</strong></p>
<p>Proin elit arcu, rutrum commodo, vehicula tempus, commodo a, risus. Curabitur nec arcu. Donec sollicitudin mi sit amet mauris. Nam elementum quam ullamcorper ante. Etiam aliquet massa et lorem. Mauris dapibus lacus auctor risus. Aenean tempor ullamcorper leo. Vivamus sed magna quis ligula eleifend adipiscing. Duis orci. Aliquam sodales tortor vitae ipsum. Aliquam nulla. Duis aliquam molestie erat. Ut et mauris vel pede varius sollicitudin. Sed ut dolor nec orci tincidunt interdum. Phasellus ipsum. Nunc tristique tempus lectus.</p>
<>
<div id="tabs-2">
<p><strong>Click this tab again to close the content pane.</strong></p>
<p>Morbi tincidunt, dui sit amet facilisis feugiat, odio metus gravida ante, ut pharetra massa metus id nunc. Duis scelerisque molestie turpis. Sed fringilla, massa eget luctus malesuada, metus eros molestie lectus, ut tempus eros massa ut dolor. Aenean aliquet fringilla sem. Suspendisse sed ligula in ligula suscipit aliquam. Praesent in eros vestibulum mi adipiscing adipiscing. Morbi facilisis. Curabitur ornare consequat nunc. Aenean vel metus. Ut posuere viverra nulla. Aliquam erat volutpat. Pellentesque convallis. Maecenas feugiat, tellus pellentesque pretium posuere, felis lorem euismod felis, eu ornare leo nisi vel felis. Mauris consectetur tortor et purus.</p>
<>
<div id="tabs-3">
<p><strong>Click this tab again to close the content pane.</strong></p>
<p>Duis cursus. Maecenas ligula eros, blandit nec, pharetra at, semper at, magna. Nullam ac lacus. Nulla facilisi. Praesent viverra justo vitae neque. Praesent blandit adipiscing velit. Suspendisse potenti. Donec mattis, pede vel pharetra blandit, magna ligula faucibus eros, id euismod lacus dolor eget odio. Nam scelerisque. Donec non libero sed nulla mattis commodo. Ut sagittis. Donec nisi lectus, feugiat porttitor, tempor ac, tempor vitae, pede. Aenean vehicula velit eu tellus interdum rutrum. Maecenas commodo. Pellentesque nec elit. Fusce in lacus. Vivamus a libero vitae lectus hendrerit hendrerit.</p>
<>
<>/code/pre
Then run this code on Load event:precode$( "#tabs" ).tabs({
collapsible: true
});/code/pre
Hi Katya,
Thank you for your anwser.
The idea is to insert components into tabs.
Is there a way to do this?
Thank you in advance.
Sophie.
Hi Sophie.
Yes it's possible. Not easy but possible.
Please follow these steps:
1 Add html component into the page. Give it name "yourTabsMainContainer". Set "DIV" type for this component.
2 Add new htmlComonent inside "yourTabsMainContainer" and give it name "firstTab". Set "DIV" type for this component. This is container for your first tab. You can put inside controls you need.
3 Add new htmlComonent inside "yourTabsMainContainer" and give it name "secondTab". Set "DIV" type for this component. This is container for your second tab. You can put inside controls you need.
4 Add new htmlComonent inside "yourTabsMainContainer" component. And fill it with following html code:
pre
code
<div id="tabs">
<ul>
<li><a href="#Screen7_firstTab">Nunc tincidunt</a></li>
<li><a href="#Screen7_secondTab">Proin dolor</a></li>
</ul>
<>
/code
/pre
5 On "page show" js event handler add following code:
pre
code
Apperyio("yourTabsMainContainer").tabs({
collapsible: true
});
/code
/pre
You need to get something like this after: http://prntscr.com/3iez2a/direct
So there is main html(div) component and 3 other inside. First - tabs. And other two - tabs content.
Note: all HTML components should have dimensions: "auto", "auto"
Regards.
Hi Sophie.
You can use HTML you need.
So simple example is just to use as HTML for tabs following code:
pre
code
<div id="tabs" data-role="navbar">
<ul>
<li><a href="#Screen7_firstTab" data-ajax="false">one</a></li>
<li><a href="#Screen7_secondTab" data-ajax="false">two</a></li>
</ul>
<>
/code
/pre
And after this change you will get this result http://prntscr.com/3iqvba/direct
Also: don't forget this code in page show event:
pre
code
Apperyio("yourTabsMainContainer").tabs({
collapsible: true
});
/code
/pre
If you have a problem plese give us public link to your app. And describe steps to reproduce it.
Regards.