将两个javascript事件组合在一起不起作用[重复]

This question already has an answer here:

Having trouble to combine both javascript events together Both class actions occurred in different clicks.

<script>
    //first event
    $("#add-product-details-video").click(function () {
        hideAlertMsg();
    });
    //second event
    $(".add-more-image").on('click', function () {
        hideAlertMsg();
    });
</script>
</div>

Based on your comment you are missing comma between multiple element selectors:

$("#add-product-details-video .add-more-image").click(function () { hideAlertMsg(); });

Should be

$("#add-product-details-video, .add-more-image").click(function () { hideAlertMsg(); });