| Page 1 of 1 | [ 10 posts ] |
|
Hello all,
My site has been using YUI Tabview 2.6, and I am beginning to transition to 3.5 due to some recent bugs. However, my site requires a Left Orientation to function. I have been unable to adjust the orientation in 3.5.0. Is this possible at this time, and if so, can anyone help me out? In 2.6 the code to make it work was: <script type="text/javascript"> var myTabs = new YAHOO.widget.TabView('demo', {orientation: 'left'}); </script> In 3.5.0, the similar line of code was this one: <script>YUI().use('tabview', function(Y) {var tabview = new Y.TabView({srcNode: '#demo'}); tabview.render();});</script> Unfortunately after several different manipulations of this line, nothing worked. It stayed at the top. I thank you in advance for your assistance with this. Dan |
|
Hi Dan,
As far as I know this is not a configurable option. probably because it is easily accomplished with just a few css tweaks. Taking the basic example here: http://yuilibrary.com/yui/docs/tabview/ ... romjs.html By looking at the tabview markup you'll notice that the tabs are in a ul and the panels are in a div. By floating the ul and div left, removing the display: inline-block on the handles you will now have handles that are aligned to the left side of the panels. I hope this helps point you in the right direction! |
Juan Ignacio DopazoYUI Contributor
|
At first I thought you meant text orientation, but indeed, it's what Jeff said.
Here's an example: http://jsfiddle.net/Uky5G/ |
|
Thank you both so much! Your assistance has been invaluable!!!
|
|
Juan,
Thanks for all your help with this. Unfortunately, my JS, while functional, is weak. You built this on the basis of the site and all its content being designed in JS, I need to have a primary focus in HTML and use JS as a tool. Can you show me the result you shared with the script in the head and all the content in the body? I tried reverse engineering what you did to fit in my site, and it did not work. Sorry to be a bother. Dan |
|
So you want to progressively enhance your markup? See this example http://yuilibrary.com/yui/docs/tabview/#from-markup
|
|
Yes, the link above is where I pulled the original code from. Unfortunately, I cannot get it to shift the tabs from the top of the page to the left side.
Juan accomplished the desired effect I wanted, but unfortunately I'm just not good enough at Javascript to design my entire site in Javascript, which his code forces me to do. I'm trying to figure out how to accomplish this: http://jsfiddle.net/Uky5G/ With the script in the head, and the html in the body. I hope I'm communicating clearly, I'm still learning the proper verbiage. Dan |
|
You just use the srcNode property like in the example instead of supplying the content object.
here: http://jsfiddle.net/Uky5G/2/ |
Juan Ignacio DopazoYUI Contributor
|
Sorry, it's confusing because I had to tell YUI to load its stylesheets before my CSS changes and that's not straightforward to do in JSFiddle. But there was nothing I did in JavaScript that had to do with the positioning of the tabs. Only my CSS rules did that.
Here's the CSS that matters. There are still tweaks to be made for it to work right in IE, so take it as inspiration, not as a finished product. Code: .yui3-skin-sam .yui3-tabview-list { float: left; border: none; width: 100px; } .yui3-skin-sam .yui3-tabview-panel { border-left: 5px solid #2647A0; margin-left: 100px; min-height: 200px; } .yui3-skin-sam .yui3-tab { margin-right: 0; } .yui3-skin-sam .yui3-tab, .yui3-skin-sam .yui3-tab-content { display: block; } |
|
Thank you both! You guys are awesome!
I really appreciate all your help with this. Dan |
| Page 1 of 1 | [ 10 posts ] |
| You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum |
© 2006-2013 Yahoo! Inc. All rights reserved.
All code on this site is licensed under the BSD License unless stated otherwise.
About This Site · Security Contact Info
Powered by phpBB® Forum Software © phpBB Group