Topic: visual effects with javascript insert/replace?
Hi,
I'm seeking to modify Ryan Bates's (Railscast) code for dynamic forms, such that an element fades/blinds/etc. in the view. I can't seem to involve the familiar effects code in Ryan's javascript, however.
Here is the code I'd like to inject visual effects into:
function add_fields(link, association, content) {
var new_id = new Date().getTime();
var regexp = new RegExp("new_" + association, "g")
$(link).up().insert({
before: content.replace(regexp, new_id)
});
}Can anyone show me how effects are to be injected into this, e.g., the inserted element fades into view?
Thanks,
Grar