/** * Created by jeong on 2018-01-13. */ 'use strict'; define(['app'], function (app) { app.directive('modalFormAutoScroll', [ function () { return { restrict: 'A', link: function (scope, element, attrs) { $(element).click(function () { $(".modal-body").animate({ scrollTop: $(".modal-body").scrollTop() + 420 }, 500); }); $(element).focus(function () { $(".modal-body").animate({ scrollTop: $(".modal-body").scrollTop() + 420 }, 500); }); } }; }]) });