[jQuery] Re: Function Problem

2009-04-12 Thread Ryan
If you really must pass the select object then try something like this $(document).ready(function(){ $("#showwhat").change(function() { show_output( $(this) ); }); function show_output(my_select) { var selected = my_select.val() ; var output

[jQuery] Re: Function Problem

2009-04-12 Thread Ryan
How about something like this $(document).ready(function(){ $("#showwhat").change(function() { show_output( $(this).val () ); }); function show_output(selected) { var output = ""; if(selected == "Tomorrow") outpu

[jQuery] Re: Function Problem

2009-04-12 Thread Chuck Harmston
I would imagine that this fixes your problem: $(document).ready(function(){ $("#showwhat").change( function(){ onSelectChange("#showwhat")); }); }); But I'm not sure that this is the best way to approach this particular problem. Try the code found here: http://jsbin.com/udam