Javascript not work after firing Updatepanel in asp.net

前端 未结 2 1268
情深已故
情深已故 2021-01-06 02:01

This is my website -> www.superim.ir Its template base is bootstrap and in nav menu I used below code for some effects!

$(\'.productbar .dropdown\').on(\'sho         


        
2条回答
  •  醉话见心
    2021-01-06 02:54

    This occurs due to the Partial Postback using UpdatePanel. The Events that you subscribe for the controls are rendered partially hence the events looses. To overcome this situation you need to rebind the control events.

    This is a common problem caused by mixing the conventional ASP.Net Ajax and jQuery events. When you do the partial postback, the DOM is recreated and the jQuery events are lost.

    Example:

    
    
                                     
                  
提交回复
热议问题