Temporarily adds a CSS class to an element.
The class will be removed once the preview ends.
This preview sets a temporary .loading
class to the targeted fragment:
up.preview('loading-attr', function(preview) {
preview.addClass('loading')
})
The element or selector to change.
If omitted, the targeted fragment will be changed.
The CSS class to add.