Hooks functions' execution to DOM queries