Skip to content

Instantly share code, notes, and snippets.

@NeMO84
Created August 24, 2011 09:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save NeMO84/1167682 to your computer and use it in GitHub Desktop.
Save NeMO84/1167682 to your computer and use it in GitHub Desktop.
JQuery Sample
# Is the semantic specifier on the id or name attribute of the div?
# If id then
$('#semantic').html('<p><%= @country.abstract.value %></p><p><%= @country.comment.value%></p><p>Currency: <%@country.currency.value%></p><p>Population: <%=@country.population.value%></p><p>Capital: <%=@country.capital.value%></p>');
# If name then
$('.semantic').html('<p><%= @country.abstract.value %></p><p><%= @country.comment.value%></p><p>Currency: <%@country.currency.value%></p><p>Population: <%=@country.population.value%></p><p>Capital: <%=@country.capital.value%></p>');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment