Skip to content

Commit 33a19e3

Browse files
committed
dried up js, updated files with new js
1 parent f3b2b1a commit 33a19e3

File tree

8 files changed

+23
-32
lines changed

8 files changed

+23
-32
lines changed

TurntableSlider.zip

109 Bytes
Binary file not shown.

css/main.css

Lines changed: 4 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

css/main.css.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

index.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,7 @@ <h2 id="settings">Settings</h2>
185185
<script type="text/javascript" src="./js/bootstrap.min.js"></script>
186186
<script src="https://cdn.rawgit.com/google/code-prettify/master/loader/run_prettify.js"></script>
187187
<script type="text/javascript" src="./js/main.js"></script>
188+
<script type="text/javascript" src="./js/general.js"></script>
188189
<script type="text/javascript">
189190
$('#turntable').turntable({axis: 'x'});
190191
</script>

js/bootstrap.min.js

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

js/general.js

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,3 @@ $(function() {
1212
}
1313
});
1414
});
15-
16-
$(window).scroll(function(){
17-
if ($(window).scrollTop() > 64) {
18-
$(".navbar").addClass("navbar-white");
19-
$(".navbar-btn").removeClass("btn-white-outline");
20-
$(".navbar-btn").addClass("btn-primary");
21-
}
22-
else {
23-
$(".navbar").removeClass("navbar-white");
24-
$(".navbar-btn").removeClass("btn-primary");
25-
$(".navbar-btn").addClass("btn-white-outline");
26-
}
27-
});

js/main.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

js/turntable.js

Lines changed: 9 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -73,15 +73,7 @@
7373
position = t.pageY - offset.top;
7474
} else {
7575
position = t.pageX - offset.left;
76-
}
77-
// loop through array and find correct range pair
78-
$.each(sections, function () {
79-
if (position >= this.min && position <= this.max) {
80-
$listItems.removeClass('active');
81-
$listItems.eq(this.index).addClass("active");
82-
}
83-
});
84-
});
76+
}
8577
} else {
8678
return $turntable.on("mousemove", function (e) {
8779
var offset = $(this).offset();
@@ -91,15 +83,15 @@
9183
} else {
9284
position = e.pageX - offset.left;
9385
}
94-
// loop through array and find correct range pair
95-
$.each(sections, function () {
96-
if (position >= this.min && position <= this.max) {
97-
$listItems.removeClass('active');
98-
$listItems.eq(this.index).addClass("active");
99-
}
100-
});
101-
});
10286
}
87+
// loop through array and find correct range pair
88+
$.each(sections, function () {
89+
if (position >= this.min && position <= this.max) {
90+
$listItems.removeClass('active');
91+
$listItems.eq(this.index).addClass("active");
92+
}
93+
});
94+
});
10395
}
10496

10597
$.fn.turntable.defaults = {

0 commit comments

Comments
 (0)