call javascript while rendering a partial in rails 3 -


i need call javascript while rendering partial in rails 3. like:

_my_partial.html.erb 

whenever partial renders, javascript function should called.

try in _my_partial.html.erb:

for html:

# partial code  <script type="text/javascript">   your_function(); </script> 

for haml:

# partial code  :javascript   your_function(#{@variable}); 

Comments

Popular posts from this blog

html - Cut text on left side inside button while centering -

plugins - CodeIgniter support on netbeans 8.0 -

php - Selecting items from MySQL for a status update feed efficiently while accounting for possible spam -