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!

    1 answer 1

    what browser? in chrome everything is working out http://jsfiddle.net/utk8K/

    • I confirm operability in the Opera - Specter