Permalink
Browse files

Send request type to jumpTo for use in presentations as well as speakers

  • Loading branch information...
1 parent 24403b0 commit 5ce94ee073a7af7e6d6a682f321ace86cf9ff386 @kborchers committed Dec 17, 2012
Showing with 3 additions and 2 deletions.
  1. +3 −2 app/scripts/directives/jumpTo.js
@@ -2,10 +2,11 @@
aerogearDevnexusApp.directive( "jumpTo", function() {
return function ( scope, element, attributes ) {
- if ( scope.speaker.id == scope.$eval( attributes.jumpTo ) ) {
+ var args = scope.$eval( "[" + attributes.jumpTo + "]" );
+ if ( scope[ args[ 1 ] ].id == args[ 0 ] ) {
setTimeout( function() {
jQuery( "body" ).animate({
- scrollTop: jQuery( "#collapse-" + scope.speaker.id ).offset().top - 40
+ scrollTop: jQuery( "#collapse-" + scope[ args[ 1 ] ].id ).offset().top - 40
}, 1500);
}, 100);
}

0 comments on commit 5ce94ee

Please sign in to comment.