Quantcast
Channel: User JohnP - Stack Overflow
Viewing all articles
Browse latest Browse all 37

Answer by JohnP for Binding events in jquery (double event on click...)

$
0
0

Well, if you want to bind two methods to the same event you can simply put them in one method and call it. I've never bound two methods to the same so can't comment on why the dual binding is failing.

$("#select_box_1").change(theCommonMethod);function theCommonMethod() {   recalc();   calculatesum();}

If you put up some code examples on jsfiddle.net, we could help you with the second problem too.

EDIT

After your update, I posted a basic fiddle with most of the events you wanted bound. Have a look at this : http://jsfiddle.net/jomanlk/v5mRe/1/

Just use the jQuery selectors to get at the values you want and then do your calculations and update your text field.


Viewing all articles
Browse latest Browse all 37

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>