That's exactly what I was going to get you do to. I would bet there is a
"jQuery" way of doing things. You can probably pass in an array of objects
or something.

You do realize that jQuery is just an interaction layer on top of javascript
right? So if you do it natively in javascript you are just cutting out a
step. jQuery doesn't do anything that you couldn't write yourself in js,
it's just done already for you in jQuery. I'm sure you know that though. :D



On Fri, Jul 16, 2010 at 1:27 PM, Ian Skinner <h...@ilsweb.com> wrote:

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

Reply via email to