How to use function with parameters and check the parameters value "if condition" using JQuery
<p>Below function was not working. please correct my mistake.</p>

<pre><code>function setupScript() {
    OtherOnchanged('call_response', 'SPAN_Other', 'Other');
}

function OtherOnchanged (onChangedId, spanId, valueToCheck) {
    if ( $("#" + onChangedId).val() ==  valueToCheck) {
        alert ("Working");
    }
}
</code></pre>
