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.

Ok, thinking about what you are talking about, I replaced that code with 
this:

                 
defineSliders("popdenSlider",popdenMIN,popdenMAX,5,"popdensity");
                 
defineSliders("cityOneMultiplerSlider",12,18,1,"cityOneMultipler");
                 
defineSliders("cityTwoMultiplerSlider",20,80,10,"cityTwoMultipler");

             function 
defineSliders(slider,slidemin,slidemax,slidestep,ctrl) {
                 $("#" + slider).slider({
                     min: slidemin,
                     max: slidemax,
                     step: slidestep,
                     slide: function(event,ui) {
                         $("#" + ctrl).val(ui.value);
                         population();
                     }
                 });
             }

I'm still curious if there is a more jQueryish way to do this?

If people haven't cottoned on to it, this is a task I've assigned myself 
just to figure out some of the jQuery ways of doing things.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
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:323175
Subscription: http://www.houseoffusion.com/groups/cf-community/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-community/unsubscribe.cfm

Reply via email to