correggendo leggermente il js del secondo file , si carica tutto, ma il controllo lo fa comunque solo una volta, la prima volta che clicco sulla pagina della pausa ci va, ma poi non torna in play nemmeno sotto minaccia
<?php
$type = of_get_option('type_background');
$image = of_get_option('background_upload');
$radio_ip = of_get_option('radio_ip');
$radioplay = of_get_option('radio_autoplay');
$radioopened = of_get_option('radio_opened');
$playerar = of_get_option('player_audio_radio');
$speedslideshow = of_get_option('slider_speed_slideshow');
$speedanimation = of_get_option('slider_speed_animation');
echo'
<script type="text/javascript">
jQuery(document).ready(function($){$("#menu-item-3354,#menu-item-3419").on("click",function(){
$("#jquery_jplayer_1").jPlayer("pause");
});
$("#menu-item-3367,#menu-item-123,#menu-item-304,#menu-item-1048,#menu-item-2788,#menu-item-1046,#menu-item-3753,#menu-item-1045,#menu-item-1044,#menu-item-3719,#menu-item-3754,#menu-item-3755,#menu-item-3751,#menu-item-41,#menu-item-3418,#menu-item-68,#menu-item-123,#menu-item-2788").on("click",function(){
$("#jquery_jplayer_1").jPlayer("play");
});';
// switch($type)
if ($type=="image") {
echo '$.backstretch("'.$image.'");';
}
//switch ($playerar)
if ($playerar=="player_radio") {
echo'$("#jquery_jplayer_1").jPlayer({
ready: function () {
$(this).jPlayer("setMedia", {
mp3: "link"
})';
//switch(radioplay)
if($radioplay == "radio_autoplay_on"){
echo '.jPlayer("play")';
}
echo';
debug($(this));
},
swfPath: "'.get_template_directory_uri().'/swf/",
supplied: "mp3",
volume: 1
});';
//switch($radioopened)
if ($radioopened=="radio_opened_visible") {
echo '
$(".radio-wz-open-hidden").click(function () {
$("#radio-wz
#radio-wz-col").slideToggle({
direction: "up"
}, 100);
$(this).toggleClass("clientsClose");
});
$("#radio-wz-col").show();
function mouseHandler(e){
if ($(this).hasClass("radio-wz-hidden-open")) {
$(this).removeClass("radio-wz-hidden-open");
} else {
$(".radio-wz-hidden-open").removeClass("radio-wz-hidden-open");
$(this).addClass("radio-wz-hidden-open");
}
}
function start(){
$(".radio-wz-open-hidden").bind("click", mouseHandler);
}
$(document).ready(start);
';
}elseif( $radioopened=="radio_opened_hidden") {
echo '
$(".radio-wz-open").click(function () {
$("#radio-wz").slideToggle({
direction: "up"
}, 100);
$(this).toggleClass("clientsClose");
});
function mouseHandler(e){
if ($(this).hasClass("radio-wz-open-hidden")) {
$(this).removeClass("radio-wz-open-hidden");
} else {
$(".radio-wz-open-hidden").removeClass("radio-wz-open-hidden");
$(this).addClass("radio-wz-open-hidden");
}
}
function start(){
$(".radio-wz-open").bind("click", mouseHandler);
}
$(document).ready(start);
';
}
}
if (of_get_option('slider_active', '1') == '1') {
if (is_front_page()){
echo'
if ( jQuery(".flexslider").length && jQuery() ) {
jQuery(".flexslider").flexslider({
controlNav: true,
animationLoop: true,
controlsContainer:"",
pauseOnAction: false,
pauseOnHover: true,
smoothHeight: true,
nextText:"›",
prevText:"‹",
keyboardNav: false,
slideshowSpeed: '.$speedslideshow.',
animationSpeed: '.$speedanimation.',
start: function(slider) {
slider.removeClass("loading");
}
});
}';
}
}
echo'
});
</script>';
?>