Advertisement
Guest User

Untitled

a guest
Apr 18th, 2014
46
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.33 KB | None | 0 0
  1. var MenuCtrl = ['$scope', '$rootScope', '$filter', '$location', '$route', 'Data', function ($scope, $rootScope, $filter, $location, $route, Data) {
  2.  
  3. $scope.menu = Data;
  4.  
  5. $scope.selected = 0;
  6. $scope.setSelected = function (index) {
  7.  
  8. $scope.selected = index;
  9. };
  10.  
  11. $scope.$on('$viewContentLoaded', function () {
  12. alert('loaded');
  13. });
  14.  
  15. }];
  16.  
  17. **My HTML -Angular**
  18. <section ng-repeat="m in menu track by $index">
  19. <section class="item">
  20. <div class="item-destinations" ">
  21. <a ng-href="{{m.PageURL}}">{{m.Title}}-{{$index}}</a>
  22. </div>
  23. </section>
  24.  
  25. **My jquery**
  26.  
  27. $('.item-destinations').hover(
  28. function (e) {
  29. e.stopPropagation();
  30. $('.navExpand').stop().animate({
  31. top: "63"
  32. }, 300, function () {
  33. destMenuOpen = true;
  34. });
  35. },
  36. function (e) {
  37. e.stopPropagation();
  38. }
  39. );
  40.  
  41. $(document).on({
  42. mouseenter: function (e) {
  43. e.stopPropagation();
  44. $('.navExpand').stop().animate({
  45. top: "63"
  46. }, 300, function () {
  47. destMenuOpen = true;
  48. });
  49. },
  50. mouseleave: function (e) {
  51. e.stopPropagation();
  52. }
  53. }, '.item-destinations');
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement