[ 2 posts ]

mlavinder

  • Joined: Thu Nov 10, 2011 5:22 am
  • Posts: 1
  • Offline
  • Profile

YUI3 Skin

Post Posted: Thu Nov 10, 2011 5:28 am
+0-
I am trying to override the default skin for a slider widget. I assumed that the skin would automatically load, but that does not appear to be the case.

Do I have to manually load yui3-skin-sam-dark, or am I doing something wrong? Here is my code:
Code:

<div class="yui3-skin-sam-dark">
    <div id="slider-bg"></div>
</div>

<script type="text/javascript">

YUI({filter: 'DEBUG', skin: {
    overrides: {
        slider: [ 'sam-dark' ]
    }
 }}).use('node','event','slider', function (Y) {

  // ..

  var slider = new Y.Slider({
        axis: 'y',
        min   : 0,      // min is the value at the top
        max   : 12,     // max is the value at the bottom
        value : 5,       // initial value
        length: '160px',  // rail extended to afford all values
    });

  slider.render("#slider-bg");

   //..

 });

</script>

Alberto Santini

YUI Contributor

  • Offline
  • Profile
Tags:

Re: YUI3 Skin

Post Posted: Thu Nov 10, 2011 5:50 am
+0-
Hello mlavinder.

'slider-base' does the job.

See Alternate skin doc for slider:
http://yuilibrary.com/yui/docs/slider/slider-skin.html

A working snippet:
http://jsfiddle.net/Kt4gz/

Hope that helps,
IceBox
  [ 2 posts ]
Display posts from previous:  Sort by  
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