|
4 | 4 | /*******************************************************************************/ |
5 | 5 |
|
6 | 6 | var App = {}; |
7 | | - App.url = "http://jquery.com/"; |
8 | | - App.cache = {}; |
| 7 | +App.url = "http://jquery.com/"; |
| 8 | +App.cache = {}; |
9 | 9 |
|
10 | 10 | App.ajax = function(service, data, success, failure){ |
11 | 11 | $.ajax({ |
12 | 12 | type: "post", |
13 | | - url: App.url+"ajax/"+service, |
14 | | - data: data, |
15 | | - dataType: "json", |
| 13 | + url: App.url+"ajax/"+service, |
| 14 | + data: data, |
| 15 | + dataType: "json", |
16 | 16 | success: function (data) { |
17 | 17 | App.publish("ajax_request_succes"); |
18 | 18 | success(data); |
19 | 19 | }, |
20 | 20 | error: function (request, status, error) { |
21 | | - App.publish("ajax_request_succes"); |
22 | | - failure(request, status, error); |
23 | | - } |
| 21 | + App.publish("ajax_request_succes"); |
| 22 | + failure(request, status, error); |
| 23 | + } |
24 | 24 | }); |
25 | 25 | }, |
26 | 26 | App.publish = function(topic, args){ |
@@ -65,63 +65,56 @@ jQuery(document).unload(function($){ |
65 | 65 | // Executes on DOM ready |
66 | 66 | // |
67 | 67 | App.subscribe("init", function(){ |
68 | | - |
69 | | - |
| 68 | + |
| 69 | + |
70 | 70 | // |
71 | 71 | // Project Select Show/Hide |
72 | 72 | // |
73 | 73 | $(".toggle-projects").bind("click", function(e){ |
74 | | - e.preventDefault(); |
75 | | - var el = $(this); |
76 | | - if(el.hasClass('active')){ |
77 | | - el.removeClass('active'); |
78 | | - $("body").animate({"marginTop":"0"}, 300, function(){ |
79 | | - el.removeClass('down'); |
80 | | - }); |
81 | | - } else { |
82 | | - el.addClass('active'); |
83 | | - $("body").animate({"marginTop":"150px"}, 300, function(){ |
84 | | - el.addClass('down'); |
85 | | - }); |
86 | | - } |
| 74 | + e.preventDefault(); |
| 75 | + var el = $(this); |
| 76 | + if(el.hasClass('active')){ |
| 77 | + el.removeClass('active'); |
| 78 | + $("body").animate({"marginTop":"0"}, 300, function(){ |
| 79 | + el.removeClass('down'); |
| 80 | + }); |
| 81 | + } else { |
| 82 | + el.addClass('active'); |
| 83 | + $("body").animate({"marginTop":"150px"}, 300, function(){ |
| 84 | + el.addClass('down'); |
| 85 | + }); |
| 86 | + } |
87 | 87 | }); |
88 | | - |
| 88 | + |
89 | 89 | // |
90 | 90 | // Project Select Clickoutside |
91 | 91 | // |
92 | 92 | $(".project-select").bind("clickoutside", function(e){ |
93 | | - var el = $(".toggle-projects"); |
94 | | - if(el.hasClass('down')){ |
95 | | - el.removeClass("active down"); |
96 | | - $("body").animate({"marginTop":"0"}, 300); |
97 | | - } |
| 93 | + var el = $(".toggle-projects"); |
| 94 | + if(el.hasClass('down')){ |
| 95 | + el.removeClass("active down"); |
| 96 | + $("body").animate({"marginTop":"0"}, 300); |
| 97 | + } |
98 | 98 | }); |
99 | | - |
100 | | - |
101 | | - |
| 99 | + |
| 100 | + |
| 101 | + |
102 | 102 | $(".presentations img, .books img").each(function (i, el) { |
103 | | - var $img = $(this), |
104 | | - $span = $img.parent(); |
105 | | - |
106 | | - $span.css("background-image", "url(" + $img.attr('src') + ")"); |
107 | | - $img.css("visibility", "hidden"); |
| 103 | + var $img = $(this), |
| 104 | + $span = $img.parent(); |
| 105 | + |
| 106 | + $span.css("background-image", "url(" + $img.attr('src') + ")"); |
| 107 | + $img.css("visibility", "hidden"); |
108 | 108 | }); |
109 | | - |
| 109 | + |
110 | 110 | $(".footer-icon-links") |
111 | 111 | .find("li a") |
112 | 112 | .append("<span></span>") |
113 | 113 | .end() |
114 | 114 | .delegate("li a", "mouseenter", function () { |
115 | | - $(this).find("span").stop(true, false).fadeTo(250, 1.0); |
| 115 | + $(this).find("span").stop(true, false).fadeTo(250, 1.0); |
116 | 116 | }) |
117 | 117 | .delegate("li a", "mouseleave", function () { |
118 | | - $(this).find("span").stop(true, false).fadeOut(250); |
| 118 | + $(this).find("span").stop(true, false).fadeOut(250); |
119 | 119 | }); |
120 | | - |
121 | | - |
122 | | - |
123 | 120 | }); |
124 | | - |
125 | | - |
126 | | - |
127 | | - |
0 commit comments