On 7/16/2010 9:45 AM, Medic wrote:
> Post your code for how you do it once and I'll see if I can help you create
> a reusable function. I assume this should be easy but since I've never
> actually used jQuery I can't say for sure.
I posted a link in the first message so anybody could see all the code.
One piece I am interested in understanding better is the slider
definitions. As you can see, they are very repetitive, but not identical
$("#popdenSlider").slider({
min:30,
max:120,
step: 5,
slide: function(event,ui) {
$("#popdensity").val(ui.value);
population();
}
});
$("#cityOneMultiplerSlider").slider({
min:12,
max:18,
step: 1,
slide: function(event,ui) {
$("#cityOneMultipler").val(ui.value);
cityPopulation();
}
});
$("#cityTwoMultiplerSlider").slider({
min:20,
max:80,
step: 10,
slide: function(event,ui) {
$("#cityTwoMultipler").val(ui.value);
//subCityPopulation();
}
});
The other piece I am really interested in is there a better way to
bubble the various calculations. This is basically spreadsheet like
functionality I am attempting to achieve in the form. I.E. with the
following definitions, I would like all the related fields to
recalculate anytime any of them are changed. Whether they are changed
by direct user input, use of the slider, or a click of an associated
random button.
* Field C = field A times field B
* Field E = square root of field C times field D
* Field G = field E times field F/100
* and so on....
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion
Archive:
http://www.houseoffusion.com/groups/cf-community/message.cfm/messageid:323174
Subscription: http://www.houseoffusion.com/groups/cf-community/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-community/unsubscribe.cfm