
Untitled
By: a guest on
Jun 20th, 2012 | syntax:
PHP | size: 1.47 KB | hits: 28 | expires: Never
<script type="text/javascript">
$(document).ready(function() {
var carousel = $("#carousel").featureCarousel({
movedToCenter: function($feature) {
// $feature is a jQuery wrapped object describing the featured that is now in the center position.
var idAlbum = $feature.find('.carousel-image').attr('id');
$.post('/artist/tracks', {id: idAlbum}, function(data){
//аудио
$("#jquery_jplayer_1").jPlayer("destroy");
// $("#jquery_jplayer_1").jPlayer("clearMedia");
// $("#jquery_jplayer_1").jPlayerPlaylist("clearMedia");
new jPlayerPlaylist({
jPlayer: "#jquery_jplayer_1",
cssSelectorAncestor: "#jp_container_1"
}, data.tracks, {
swfPath: "/static/site/js",
supplied: "mp3",
wmode: "window"
});
}, 'json');
}
});
$("#but_prev").click(function () {
carousel.prev();
});
$("#but_next").click(function () {
carousel.next();
});
});
</script>