I have a asp.net page with two jquery button.
All is in an updatepanel. When I click on Jquery button all work but after all stops to work. Icons on button disappear and not responding to click event.
This is code of one button:
$(document).ready(function () {
$("#btCerca").button({
icons: {
primary: 'ui-icon-search'
}
}).click(function () {
document.getElementById("<%= btnRicerca.ClientID%>").click();
return false;
});
Reading around forum I'have found a partial solution. using .live method
This is the new code:
$(document).ready(function () {
$("#btCerca").button({
icons: {
primary: 'ui-icon-search'
}
}).live('click',function () {
document.getElementById("<%= btnRicerca.ClientID%>").click();
return false;
});
$("#cmdAnnulla").button({
icons: {
primary: 'ui-icon-squaresmall-close'
}
}).live('click', function () {
document.getElementById("<%= btnAnnulla.ClientID%>").click();
return false;
});
});
So my problem is icons on button. They disappear after the first click.
How I solve it?