jQuery slider color picker / slider to change background -



jQuery slider color picker / slider to change background -

i'm trying do:

decreasing temperature values of slider, need circle represents star gradually increment , alter background color link: http://astro.unl.edu/naap/hr/animations/hrexplorer.html

but code isn't doing it.....see lines $("#s_tem").slider({ see code: http://jsfiddle.net/nxnxj/19/

thanks..

you assigning variable chosencolor values like: #597459745974

which not valid css color attributes.

[edit] here's code should going:

$("#s_tem").slider({ change: function(event, ui) { var hexvalue = ui.value.tostring(16).touppercase(); if (hexvalue.length < 2) hexvalue = "0" + hexvalue; var chosencolor = numbertohexcolor(hexvalue); $('#t_tem').val(chosencolor); $("#star").css('background-color', chosencolor); }, value: 5800, min: 2300, max: 40000, step: 100, }); function numbertohexcolor(number) { var hexcolor = '' + number; while (hexcolor.length < 6) { hexcolor = '0' + hexcolor; } homecoming '#'+ hexcolor; }

jquery slider color-picker

Comments

Popular posts from this blog

How do I check if an insert was successful with MySQLdb in Python? -

delphi - blogger via idHTTP : error 400 bad request -

postgresql - ERROR: operator is not unique: unknown + unknown -