<html> <head> <script src="http://code.jquery.com/jquery-1.8.3.js"></script> <script> $(function() { $('.ajout_sc').click(function() { $(this).before(''); }); $('.nvlle_sc').live('click', function() { alert('ok'); // La fonction alert ne fonctionne pas !! }); }); </script> </head> test </html>
<html> <head> <script src="http://code.jquery.com/jquery-1.8.3.js"></script> <script> $(function() { $('.ajout_sc').click(function() { $(this).before(''); }); $(document).on("click", ".nvlle_sc", function(){ alert('ok'); }); }); </script> </head> test </html>