I have a div with "id=ShowDetails". In my javascript I have this:
$(document).ready(function () {
UIactions();
});
function UIactions () {
$('#ShowDetails').click(function () {
alert("bingo");
}
});
The div is inside the update panel that gets posted back. When the page loads, if I click the div, I get the bingo but after the postback, I don't. Any idea why?
Thanks.
I know that this is a really old post, but i came by this by having the issue that my jQuery script didn't work after content inside an update panel was updated.
I found an easy solution and all the other solutions are not worth looking at :)
Simple just remember to add your asp.net controls to the UpdatePanel's Triggers as postback.
<Triggers>
<asp:PostBackTrigger ControlID="....." />
</Triggers>
Hope this help someone, because i have spent too much time on finding the solution.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With