Я использую jQuery, чтобы добавить JavaScript, когда элемент расширяется.
Но код JavaScript внутри функции jQuery приводит к взрыву остальной части кода jQuery.
$(this).parent('li').find('.moreInfo').append('<script>alert("hello");</script>');
Что я могу сделать для решения этой проблемы?