Просто у меня как-то так. Если я динамически добавляю посты, для них не обрабатываются события подобного рода.
$(document).ready(function($){
...
$('.post').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();
});
...
});