-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathscript.js
33 lines (25 loc) · 1003 Bytes
/
script.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
$(document).ready(function() {
$('#hide-images').click(function() {
$('.process-image-large').toggle(300);
$('#intro-image').toggle(300);
$('.ingredient-image').toggle(100);
$('span.ingredient-text').toggleClass('ingredient-text-only-display');
$('#hide-images').html($('#hide-images').text() == 'Show Images' ? 'Hide Images' : 'Show Images');
});
$('.ingredient-image').hover(function() {
$(this).next().toggleClass("ingredient-text");
$(this).next().toggleClass("ingredient-text-popup");
});
$('.ingredient-image').click(function() {
$(this).toggleClass('purchased');
$(this).next().toggleClass('text-purchased');
});
$('span.ingredient-text').click(function() {
$(this).toggleClass('text-purchased');
$(this).prev().toggleClass('purchased');
});
$('.slide-button').click(function() {
$(this).html($(this).text() == 'Done this step' ? 'Review this step' : 'Done this step');
$(this).prev().slideToggle(200);
});
});