jquery UI slider not working in Safari.

Posted by Joe on Stack Overflow See other posts from Stack Overflow or by Joe
Published on 2010-05-04T19:44:19Z Indexed on 2010/05/04 19:48 UTC
Read the original article Hit count: 131

Filed under:

so i have the below code, which I think is fine:

jQuery( function() {
    jQuery("#slider-vertical").slider( {
        orientation :"vertical",
        range :"min",
        min :0,
        max :100,
        value :50,
        slide : function(event, ui) {
            jQuery("#amount").val(ui.value);

            var movie = thisMovie('ClusterFlash');
                fromScroll = jQuery("#amount").val();

            if (movie) {
                currentSentiment = ((100 - fromScroll) / 100);
                movie.sentimentChange(currentSentiment);
            }
        }
    });
});

the 'movie' var above calls the following function, which seems to be where my problem is.

function thisMovie(movieName) {
    if (navigator.appName.indexOf("Microsoft") != -1) {
        return window[movieName];
    }
    if(document[movieName].length != undefined) {
        return document[movieName][1];
    }
    return document[movieName];
}

Any help would be appreciated. Thank

© Stack Overflow or respective owner

Related posts about jquery-ui