add immediate function snippet passing jquery