How to call a javascript function? I have included in my theme a new javascript library(Easy-Responsive-Tabs-to-Accordion) which converts horizontal tabs to accordion.
So I have included in my .info theme 
scripts[] = js/Easy-Responsive-Tabs-to-Accordion/js/easyResponsiveTabs.js

Then,according to the instructions,I have to call the javascript function $('#demoTab').easyResponsiveTabs();

My question is:Where to add this javascript function?
thanks
You can continue easyResponsiveTabs.js as normal JS and add your function call. Also you can call this function almost anywhere (like tpl.php file), even in the block/node (where you are using this script for conversion) wrapped in the &lt;script&gt; tag like:

&lt;script&gt;
$('#demoTab').easyResponsiveTabs();
&lt;/script&gt;


I would go with drupal_add_js in template.php file of your theme.

Update

Using drupal_add_js you can do it like this:

drupal_add_js('jQuery("#demoTab").easyResponsiveTabs();', 'inline');