Skip to content

Instantly share code, notes, and snippets.

@fivetwentysix
Created November 25, 2010 08:40
Show Gist options
  • Save fivetwentysix/715091 to your computer and use it in GitHub Desktop.
Save fivetwentysix/715091 to your computer and use it in GitHub Desktop.
if ($('repliesContainer')) {
var containerElement = $('repliesContainer');
var highlightEffect = function() {
var newElement = containerElement.getChildren('div').getLast();
newElement.setStyle('color', '#ffa');
};
new Request.HTML({
url: '<%= instruction_instruction_item_reply_path(:id => @reply.id) %>',
append: $(containerElement),
onSuccess: highlightEffect
}).get();
} else {
new MUI.notification('Reply saved.');
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment