How to optimize my javascript?
<p>I have inherited a piece of code which has a series of functions like the following:</p>

<pre><code>$("#data[User][notify_one_day_out]").change(function () {
    $("#updatenotificationsform").submit();
}

$("#data[User][notify_one_month_out]").change(function () {
    $("#updatenotificationsform").submit();
 }
</code></pre>

<p>and this goes on and on. How do I just write one function that does the same thing since every ID begins with data. Sorry am a JS newbie</p>

<p>Thanks</p>
