Dear coders js tell me what the problem is. The first function works, and the second, which replaces the contents does not work, why?
<script> var ac = '<div onClick="b();">Действие_2</div>'; function a() { $('#description').html( "Текст_1" ); $('#active').html( ac ); } function b() { $('#description').html( "Текст_2" ); } </script> <div id="active"> <div onClick="a();">Действие</div> </div> <div id="description">текст</div> Thanks in advance!