jQueryでphp echoを動作させるのに問題があります。
global $data; // fetch options stored in $data
正しい方向に向けてください、ありがとう。
jQuery
$(window).load(function(){
var slidertype = "<?php global $data; echo $data['slider_type']; ?>";
$('.flexslider').flexslider( {
animation: "slidertype",
controlNav: false,
smoothHeight: true,
slideshowSpeed: 7000,
animationSpeed: 600,
start: function(slider) {
$('body').removeClass('loading');
}
});
});
PHP
<select id="slider_type" name="slider_type">
<option value="slide" id="0"></option>
<option value="fade" id="1"></option>
</select>