ASP.net Ajax and JQuery - Partial Postback

The list of radio cleansers and the repeater are in the updated panel. The repeater uses the jQuery tools plugin - scrollable.

The scrollable plugin works after the page loads. This happens after I press the switch.

I put the enter button to run the script below after the partial postback, and the scrollable functionality works after I click on it, so I assume that after clicking / the partial postback of the radio button below javascript is needed, the scrollable is not executed.

A scrollable plugin requires this:

<script type="text/javascript"> $(function() { $("div.scrollable").scrollable({ size: 3 }); }); </script> 

How do I start this after clicking the radio? Or is there an alternative way to run this script after a partial postback? I do not want to make a complete answer to fix this problem.

Thanks in advance.

+4
source share
1 answer

Scrollable does not work after partial postback, as this part of the page is re-displayed, but the page does not load again (your javascript does not start). You can register a function that will be executed when the partial mail is completed and will cause scrolling from there, so that it continues to work after the partial postback.

 $(function() { Sys.WebForms.PageRequestManager.getInstance().add_endRequest(EndRequestHandler); function EndRequestHandler(sender, args) { $("div.scrollable").scrollable({ size: 3 }); } }); 
+10
source

All Articles