Skip to content

Instantly share code, notes, and snippets.

@thomasv314
Created June 23, 2011 16:52
Show Gist options
  • Save thomasv314/1042974 to your computer and use it in GitHub Desktop.
Save thomasv314/1042974 to your computer and use it in GitHub Desktop.
<% if [email protected]? %>
<% @mentions.each do |mention| %>
$('#mentions').append('<%= escape_javascript("<div class=\"mention\"> #{mention[:text]} <br/><em>by #{link_to mention[:user][:name], "http://twitter.com/" + mention[:user][:screen_name]} </em></div>
") %>');
<% end %>
<% end %>
@thomasv314
Copy link
Author

I'm new to javascript in general, I have the remote response working but when it appends the html it isn't styled, resulting in something like this: http://i.imgur.com/n3ZE1.png

can anyone help? :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment