|
@@ -29,7 +29,7 @@ $(document).ready(function () {
|
|
|
|
|
|
$('#switcher').off('click', toggleSwitcher);
|
|
$('#switcher').off('click', toggleSwitcher);
|
|
|
|
|
|
- if (className == 'default') {
|
|
|
|
|
|
+ if (className === 'default') {
|
|
$('#switcher').on('click', toggleSwitcher);
|
|
$('#switcher').on('click', toggleSwitcher);
|
|
}
|
|
}
|
|
};
|
|
};
|
|
@@ -61,7 +61,14 @@ $(document).ready(function () {
|
|
}
|
|
}
|
|
});
|
|
});
|
|
|
|
|
|
|
|
+ // Exercise 1.
|
|
$('.author').click(function () {
|
|
$('.author').click(function () {
|
|
$(this).toggleClass('selected');
|
|
$(this).toggleClass('selected');
|
|
});
|
|
});
|
|
|
|
+
|
|
|
|
+ // Exercise 2.
|
|
|
|
+ $('.chapter-title').dblclick(function () {
|
|
|
|
+ $(this).siblings().toggleClass('hidden');
|
|
|
|
+ });
|
|
|
|
+
|
|
});
|
|
});
|