Javascript: How to only invoke a function that's called from within another function when a specific div is NOT clicked? : I am calling campusInfo(id) a few places in my code. 
Inside campusInfo(id) function I am calling campusInfo_2(HouseID).

One of the instances where I am calling campusInfo(id) is on the onclick of a div. 
In this case I don't want campusInfo_2(HouseID) invoked.



Here is the campusInfo(id) javascript function which calls campusInfo_2(HouseID)

//campus information
function campusInfo(id) {
    fetch(`https://api/` + id)
        .then(r => r.json())
        .then(r => {
            const mapClassToResponse = {
                '.campus-name': 'name',
               '.program-levels-values:eq(4)': 'annualTuition'
            };
            var HouseID = r['Houses'][0]['HouseID'];

            Object.keys(mapClassToResponse).map(k => {

                $(k).html(r[mapClassToResponse[k]]);
            });

            //formatting numbers to have commas
            $(".program-levels-values:eq(4)").digits();
            $(".campus-number:eq(0)").digits();
            $(".campus-number:eq(1)").digits();            
            
            //program-levels
            $(r.programLevels).each(function (index, item) {
                $('.program-levels-values:eq(0)').append(item.programLevel + ' ');
            });

            //institution control
            if (r.isInstitutionControlPublic == false) {
                $('.program-levels-values:eq(2)').html('Private');
            } else {
                $('.program-levels-values:eq(2)').html('Public');
            }
          
    campusInfo_2(HouseID);            
        }).catch(console.log);
     };


Here is the div where I don't want campusInfo_2(HouseID) being invoked

      <div class="other-school" onclick="campusInfo(10)"><label 
      class="other-schools-list">Portland State University</label</div>

Here is what I tried thus far but it was saying in console that the element was undefined.

      if(document.getElementsByClassName('other-school').clicked == false)
            {
            campusInfo_2(HouseID);
            }