I want to add an argument of a function to a string (iam not sure if thats the right word)
function changeChart(form, chart, bar) {
//chart 2 (left)
$(form).change(function (){
console.log(form);
$(form + "option:selected").each(function(){
//rest of the function
I want the form added to the selection in Jquery.
Is this the right way?
formlook like? Is it theactual object, such as$('#myForm'), or is it a string representation of the selector, such as#myForm?