changed the duration param to length for clarity. Grab framewidth and height from css if undefined