jQuery button click to hide a div -


i have <div> hidden through jquery inital when page loads. have button, in on click event <div> gets visible. want <div> hidden on button click event also. have event on button click binding grid in asp.net.

following code have tried in #dinner div , #bnextweek button.

$(document).ready(function () {     $('#dinner').hide();      $('#<%=bnextweek.clientid%>').live('click', function (e) {          $('#dinner').hide();                                     }); }); 

try this

$('#'+<%=bnextweek.clientid%>).live('click', function (e) {         $('#dinner').hide();                                 }); 

or can try with

$('#'+<%=bnextweek.clientid%>).live('click', function (e) {        $('#dinner').css('display','none'); }); 

Comments

Popular posts from this blog

Delphi XE2 Indy10 udp client-server interchange using SendBuffer-ReceiveBuffer -

Qt ActiveX WMI QAxBase::dynamicCallHelper: ItemIndex(int): No such property in -

Enable autocomplete or intellisense in Atom editor for PHP -