I have 2 different event on different classes :
$(\'.box1\').click(function(){
$(this).find(\'something\').css(\'red\')
}
$(\'#otherId .box2\').change(function(
You can use something like this to pass it through if you want to get an inputs value then change it and output the final value next to it:
var finalOutput;
function getDetails(args) {
args = "Hello World";
return args;
}
$('.box2').change(function(){
var inputValue = $(this).val();
finalOutput = getDetails(inputValue);
$('.box2').after('' + finalOutput + '');
});
Here is a working example:
http://jsfiddle.net/La4v9mL0/