Echo php in jQuery
<p>I am having problem getting the php echo to work in jQuery.</p>

<pre><code>global $data; // fetch options stored in $data
</code></pre>

<p>Can you please point me in the right direction, Thanks.  </p>

<h1>jQuery</h1>

<pre><code>$(window).load(function(){
  var slidertype = "&lt;?php global $data; echo $data['slider_type']; ?&gt;";
  $('.flexslider').flexslider( {
        animation: "slidertype",
        controlNav: false,
        smoothHeight: true, 
        slideshowSpeed: 7000, 
        animationSpeed: 600,
        start: function(slider) {
          $('body').removeClass('loading');
        }
      });
     });
</code></pre>

<h1>PHP</h1>

<pre><code>&lt;select id="slider_type" name="slider_type"&gt;
    &lt;option value="slide" id="0"&gt;&lt;/option&gt;
    &lt;option value="fade" id="1"&gt;&lt;/option&gt;
&lt;/select&gt;
</code></pre>
