外部jsをロードするページがあり、そのページに関数がありますcalled calculate_totals()
。私が欲しいのはcalculate_totals()
、外部jsの関数から関数を呼び出すことです。
これは、外部jsに読み込まれるJavaScriptの一部です
function selectItemMouse(thisVar)
{
var searchValue = thisVar.attr('data-name');
thisVar.parent().parent().parent().parent().children('.list').val(searchValue);
//alert(thisVar.parent().parent().parent().parent().next().find('input').focus());
thisVar.children().children().each(function()
{
var dataId = $(this).attr('data-id');
var value = $(this).attr('data-name');
//This change the input of my form
$(thisVar).parent().parent().parent().parent().children().children('.'+dataId).val(value);
});
$('.customerResults').hide();
calculate_totals();
}