The recent work needed to enhance the user experience, and the project manager's user experience was poor, so I started thinking about the following instructions. This command allows the user to click on the drop-down or other responses displayed when the screen is not visible because of scrolling, that is, let the user see what he wants to see.
Specific as follows:
define ([' angular '),function(){varCommondirectives = Angular.module ("Commondirectives", []); Commondirectives.directive ("Tolocate",function () { return{restrict:"AE", scope:{tid:"@", Pscope:"@"}, Link:function(scope, element, Attrs) {Element.bind ("Click",function(event) {event.stoppropagation (); varScroll_offset = $ ("#" +scope.tid). offset (); if(Scope.pscope = =undefined) { $("Body,html"). Animate ({scrollTop:scroll_offset.top},1000); }Else{ $("." +scope.pscope). Animate ({scrollTop:scroll_offset.top},1000); } }) } } })})
Structure-behavior-style-angularjs--instruction implementation manual trigger response to page specified location