Posted By

tenpaiyomi on 12/14/09


Tagged

textmate rails rjs conditions


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

lfatr


Conditional RJS


 / Published in: Other
 

  1. page << "if($('some_div').visible()){"
  2. page['some_div'].replace :partial => 'some_partial'
  3. page << '}else{'
  4. page.insert_html :after, 'something_else', :partial => 'header'
  5. page << '}'
  6.  

Report this snippet  

You need to login to post a comment.