Skip to content

Commit 8e31245

Browse files
committed
fix formatting and trailing whitespace in scripts.js
1 parent 36f5f65 commit 8e31245

File tree

1 file changed

+40
-47
lines changed

1 file changed

+40
-47
lines changed

content/assets/js/scripts.js

Lines changed: 40 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -4,23 +4,23 @@
44
/*******************************************************************************/
55

66
var App = {};
7-
App.url = "http://jquery.com/";
8-
App.cache = {};
7+
App.url = "http://jquery.com/";
8+
App.cache = {};
99

1010
App.ajax = function(service, data, success, failure){
1111
$.ajax({
1212
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",
1616
success: function (data) {
1717
App.publish("ajax_request_succes");
1818
success(data);
1919
},
2020
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+
}
2424
});
2525
},
2626
App.publish = function(topic, args){
@@ -65,63 +65,56 @@ jQuery(document).unload(function($){
6565
// Executes on DOM ready
6666
//
6767
App.subscribe("init", function(){
68-
69-
68+
69+
7070
//
7171
// Project Select Show/Hide
7272
//
7373
$(".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+
}
8787
});
88-
88+
8989
//
9090
// Project Select Clickoutside
9191
//
9292
$(".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+
}
9898
});
99-
100-
101-
99+
100+
101+
102102
$(".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");
108108
});
109-
109+
110110
$(".footer-icon-links")
111111
.find("li a")
112112
.append("<span></span>")
113113
.end()
114114
.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);
116116
})
117117
.delegate("li a", "mouseleave", function () {
118-
$(this).find("span").stop(true, false).fadeOut(250);
118+
$(this).find("span").stop(true, false).fadeOut(250);
119119
});
120-
121-
122-
123120
});
124-
125-
126-
127-

0 commit comments

Comments
 (0)