title: How to use smarty variable inside jquery?
body: <p>Is it possible to use smarty variable inside jquery function ? For example: I have <code>/{$country}/{$lang}/8_about-ats.html</code> and I need to put this lane of code between data brackets in Jquery : <code>location.href = $(this).data('smarty_code_here');</code>. Thank you very much.</p>
  
  <p>Jquery:</p>
  
  <pre><code>{literal}
  &lt;script type="text/javascript"&gt;
  $(document).ready(function() {
  
     $('#about_ats h3 a').click(function(e){
      $(this).attr('href',"/{$country}/{$lang}/8_about-ats.html"); 
     });
  });
  &lt;/script&gt;
  {/literal}
  </code></pre>
  
  <p>HTML:</p>
  
  <pre><code>&lt;div id="about_ats" data-role="collapsible"&gt;
       &lt;h3&gt;&lt;a href="#"&gt;About ATS&lt;/a&gt;&lt;/h3&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>Jquery full code:</p>
  
  <pre><code>&lt;script type="text/javascript" src="/js/jquery-1.8.3.min.js"&gt;&lt;/script&gt;
  {literal}
  &lt;script type="text/javascript"&gt;
  $(document).on("mobileinit", function () {
      $.mobile.ajaxEnabled = false;
  });
  &lt;/script&gt;
  {/literal}
  &lt;script type="text/javascript" src="/js/jquery.mobile-1.2.1.min.js"&gt;&lt;/script&gt;
  {literal}
  &lt;script type="text/javascript"&gt;
  $(document).ready(function() {
      var arr = location.href.split("/")
      var hostname = arr[2];
      var countryCode = arr[3];
      var languageCode = arr[4];
  
      if(window.location.href == "http://"+hostname+"/"+countryCode+"/"+languageCode+"/" || window.location.href == "http://"+hostname+"/"+countryCode+"/"+languageCode+"/1_reseni-pro-prumyslovou-a-procesni-automatizaci-kvalitu-a-it.html"){
          $('#nav').show();
          $('#nav h4').hide();
          $('#nav h4 a').trigger('click');
      }else{
          $('#nav').hide();
          $('#nav h4').hide();
      }
     $('#languages').hide();
     $('.search').hide();
     $('.contacts').hide();
     $('#menu').click(function(e){
      e.preventDefault();
      $('#nav').slideToggle('300');
      if($("#nav").css('visibility') == 'hidden') {
  
      }else{
          $('#nav h4 a').trigger('click');    
      }
     }); 
     $('#search_menu').click(function(e){
      e.preventDefault();
      $('.search').slideToggle('300');
     });
     $('#globe_menu').click(function(e){
      e.preventDefault();
      $('.contacts').slideToggle('300');
      if($(".contacts").css('visibility') == 'hidden') {
  
      }else{
          $('.contacts h2 a').trigger('click');    
      }
     });
     $('#lang_menu').click(function(e){
      e.preventDefault();
      $('#languages').slideToggle('300');
      if($("#languages").css('visibility') == 'hidden') {
  
      }else{
          $('#languages h4 a').trigger('click');    
      }
     });
     $('#about_ats h3 a').click(function(){
     {/literal}
              alert("/{$country}/{$lang}/8_about-ats.html"); 
     {literal}
     });
  });
  &lt;/script&gt;
  {/literal}
  </code></pre>