<% if @graffity.approved && !@graffity.new_record? %>
<% escaped_js = escape_javascript(render(:partial => "member/graffities/graffity", :object => @graffity)) %>        
  if (jQuery("#graffities").children().length > 0)
    jQuery("#graffities").prepend("<%= escaped_js %>");
  else
    jQuery("#graffities")[0].innerHTML("<%= escaped_js %>");
<% end %>
<% if @graffity.approved && !@graffity.new_record? %>
<% escaped_js = escape_javascript(render(:partial => "member/graffities/graffity", :object => @graffity)) %>        
  if (jQuery("#graffities").children().length > 0)
    jQuery("#graffities").prepend("<%= escaped_js %>");
  else
    jQuery("#graffities").replaceWith("<%= escaped_js %>");
  jQuery("textarea.reply", jQuery("#graffities")).filter(function(){
      return !(!!jQuery(this).data('events'));
  }).placeholder();        
<% end %>
Add placeholder behaviour to textarea loaded dynamically after create a graffity
Add placeholder behaviour to textarea loaded dynamically after create a graffity
