Scroll to top after clicking on shots/tasks
This commit is contained in:
@@ -269,11 +269,20 @@ $(function() {
|
||||
// rather than the thing we clicked on.
|
||||
var shot_id = e.delegateTarget.dataset.shotId;
|
||||
shot_open(shot_id);
|
||||
|
||||
if ($(window).scrollTop() > 270) {
|
||||
$("html, body").animate({scrollTop: 0 }, '500', 'swing');
|
||||
}
|
||||
});
|
||||
|
||||
$("a.task-link[data-task-id]").click(function(e) {
|
||||
e.preventDefault();
|
||||
var task_id = e.delegateTarget.dataset.taskId;
|
||||
task_open(task_id);
|
||||
|
||||
if ($(window).scrollTop() > 270) {
|
||||
$("html, body").animate({scrollTop: 0 }, '500', 'swing');
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
|
Reference in New Issue
Block a user