But that "content of a div" is not to be changed unless a function, which uses some methods, is fired itself by a certain event, following a certain action. Now simply fire the other function at the end of the first function's code lines.
Anyway, your request is too vague. Can you detail a little bit your aim? Maybe an example