« Back
Sammy.Application swap ( content )
Swaps the content of $element() with content
You can override this method to provide an alternate swap behavior
for EventContext.partial().
Example
var app = $.sammy(function() {
// implements a 'fade out'/'fade in'
this.swap = function(content) {
this.$element().hide('slow').html(content).show('slow');
}
get('#/', function() {
this.partial('index.html.erb') // will fade out and in
});
});
comments powered by Disqus