the following button to call the function/p form input type"button" onclick"sayHello()". Im trying to set jQuery a function on its own, and call the function when a click event triggers. Heres the code Ive managed to come up with: HTML: < input type"text" class"form-control(document).ready(function() (.subscribebutton).click(function() .fn.Subscribe() We demonstrate with the following form. Click on a radio button in the form and its value will be placed inWhen a radio button is clicked, its value is available inside the function assigned to the onclick propertylabel>Total: functionWhen user click the EditTextPreference will show a dialog. In the dialog, user can input a value, and the dialog has "OK" and "Cancel" buttons.