Сообщение от tsigel
|
Есть 2 пути решения:
Хотя так как вы пользуете jQuery - просто почитайте документацию метода "on", там есть решение вашей проблемы.
|
Результат такой же. Попробую от родителя
...
$('.post').on('click',function(event) {
console.log('click')
/* Act on the event */
if (nowPlay) {
document.getElementById(nowPlay +"music").pause();
};
console.log(nowPlay);
nowPlay = $(this).attr("song");
document.getElementById(nowPlay +"music").play();
});
...