Answer the question
In order to leave comments, you need to log in
After downloading articles, the player script does not work?
I have content loaded using ajax and in some articles I use the jwplayer player, but after loading the articles the player script does not work. Here is the output code of the player
<div id='38'></div>
<script type="text/javascript">
var playerInstance = jwplayer("38");
playerInstance.setup({
file: "https://www.youtube.com/watch?v=WrBLHH3WZ5M",
width: "100%",
height: "100%"
});
</script>
jQuery(document).ready(function($) {
var $container = $('#masonry');
$container.infinitescroll({
navSelector : '#navigation',
nextSelector : '#navigation #navigation-next a',
itemSelector : '.item',
maxPage :5,
loading: {
msgText: '<?php _e('Loading', 'prpin') ?>',
finishedMsg: '<?php _e('All items loaded', 'prpin') ?>',
img: '<?php echo get_template_directory_uri(); ?>/img/loading.gif',
}
},
// запускаем Masonry как обратный вызов
function(newElements) {
// скрываем новые элементы во время загрузки
var $newElems = $(newElements).css({
opacity: 0});
// убедитесь, что изображения загружаются перед добавлением в макет кладки
$newElems.imagesLoaded(function() {
// показать элементы, теперь они готовы
$newElems.animate({
opacity: 1});
$container.masonry('appended', $newElems, true);
});
onAfterLoaded($newElems);
}
);
});
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question