How to use a variable in script tag of template file? I want to use $node-&gt;title in the script tag so that I can get data dynamically for particular titles. So I am not getting how can I achieve this. I tried like below, but not worked.

 &lt;script type="text/javascript"&gt;
     var job_title = $node-&gt;title;
     var container_id = "#footer";
     Springest.getTrainings(job_title, container_id);
  &lt;/script&gt;


Thanks for any suggestions.
You can simply embed php in javascript, however the way you are adding your js is not recommended, please look around drupal way of adding js and sending values from php to javascript.

Having said that, the following code might help you-

&lt;script type="text/javascript"&gt;
     var job_title = &lt;?php echo $node-&gt;title; ?&gt;;
     var container_id = "#footer";
     Springest.getTrainings(job_title, container_id);
  &lt;/script&gt;