yui slider image not appearing

yui slider image not appearing

by Pinky Sharma -
Number of replies: 1

I created a yui slider to change the font size in theme (standard). Every thing is working fine instead of slider image.

I added a snippet of code in header part of general.php file. Here is my code:-

YUI().use('node', 'slider', 'dd-drag','cookie', function (Y) {
        /*
         * Font Size Slider
         */
        var body = Y.get('body');
        var slider = new Y.Slider({
            min: 10,
            max: 20,
            railSize: '100px',
            value: Y.Cookie.get("yuifont") || 13
        });
        slider.render('.horiz_slider');
        slider.after('valueChange', function (e) {
            body.setStyle('fontSize', e.newVal + 'px');
            Y.Cookie.set("yuifont", e.newVal , {
                expires: new Date("January 12, 2025"),
                path: "/"           //all pages
            });
        });
        /*
         * Drag and Drop
         */
        var dd = new Y.DD.Drag({
            node: '.clearfix'
        });
        
        Y.get('.clearfix').setStyle('cursor', 'move');
    });

I also tried to use custom path like:

var slider = new Y.Slider({
            min: 10,
            max: 20,
            railSize: '100px',
            value: Y.Cookie.get("yuifont") || 13,
thumbImage: 'http://localhost/moodle/theme/mytheme/pix/thumb-classic-x.png'  

      });

But it doesn't make any difference.

The image path my browser  is showing is:-

<img class="yui3-slider-thumb-shadow" alt="Slider thumb shadow" src="http://localhost/moodle/theme/yui_combo.php?3.2.0/build/slider/assets/skins/sam/thumb-x.png">
<img class="yui3-slider-thumb-image" alt="Slider thumb" src="http://localhost/moodle/theme/yui_combo.php?3.2.0/build/slider/assets/skins/sam/thumb-x.png">
Am I doing something wrong.I don't have much knowledge about yui. I have tried to find any posts/references to this, but no luck so far... Any ideas what should I do?
PS - Initially I posted this problem on theme forum but as this is actually an YUI specific question so I am posting it here. Don't really know which forum it should belong.
Average of ratings: -
In reply to Pinky Sharma

Re: yui slider image not appearing

by tiago tiago -

Hi!

use 'thumbUrl' instead of the (documented) 'thumbImage'.

 

ciau!