Widget issues - need a help

Widget issues - need a help

1. I have created a widget (plugin) using jquery mobile and the widget has a button

....

                                                     var ctrls ="<input type='button' id='button1' value='Test' />";

                                                     inputElement.html(ctrl)

2. Widget is working properly on the page with Data-Role ='mywidget'

3. but when I create two widgets on the page, the button event will be triggered for the first widget, but not to second

can anybody help to resolve the issue.