Thursday 15 September 2011

c# - Bind Jquery event on controls that have visible set to false -



c# - Bind Jquery event on controls that have visible set to false -

i have gridview within panel control.panel set visible="false".i want bind jquery event on gridview command like-

$('#<%=grd.clientid%>').click(function(){ //do stuff });

but event not binding due visibility of control.

is there way so?

use event delegation:

$(document).on('click', '#<%=grd.clientid%>', function() { //... });

see direct , delegated events section of on() documentation.

c# jquery asp.net

No comments:

Post a Comment