There is something like this:

$(document).ready(function(){ $('#panel').load('charmenu/panel.php'); $("#b_c").click(function(){функция}; }); 

In the div with id = panel, a panel of three buttons is loaded, one of which has id = b_c. The function that should handle pressing this button does not work.

Tell me, please, the correct syntax in this case.

I strongly ask you not to hit the head, I just started to get acquainted with jquery, I did not find anything in man

  • @Anansi $ ('# panel'). On ('click', '#b_c', function () {...}); Explain how it works, no longer have the strength, if you want to understand - the official documentation on .on() and google:delegated events to help. - etki

0