Need a little help with my jquery here
I want all my button with a name starting with “my-” and finishing with “-press” to have a “click” event.
<input type="button" id="my-button-x-press" name="my-button-x-name-press" />
Buttons dynamically added to DOM should have the same event.
http://api.jquery.com/category/selectors/
To assign event to elements dynamically, use
onhttp://api.jquery.com/on/ and supply your selector as the second argument to properlydelegateevent.Assuming you are wrapping your inputs on
#container, otherwise replace#containerwithbody, but it’s always preferable to select the closest ancestor of theselector