jquery form name selector not working when passed as a parameter
<p>I have a function which takes 4 parameters i.e form name, class of button , function , eventType
all i want to do is select the element button of the form and call the function accordingly but it doesnt work for me
<strong>Works when i hard code the form name and button class</strong></p>

<pre><code>registerFormEvent : function(formName,buttonClass,func,eventType) {
$('form[name= "demoForm"]').find('.submit').on(eventType,func);
</code></pre>

<p><strong>while it wont work when i try to pass the param into the form name and buttonClass name</strong></p>

<pre><code>registerFormEvent : function(formName,buttonClass,func,eventType) {
    $('form[name= formName]').find(buttonClass).on(eventType,func);
}
</code></pre>

<p>I know its an Syntax Error but i could not find a way to do it ..help is really appreciated</p>
