js snippet to hook jquery