download jquery.connect.js file include this file in your html file. and use $.connect function to connect a function to another function.