summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbtopro2013-10-25 05:32:20 (GMT)
committer btopro2013-10-25 05:32:20 (GMT)
commit6bb4a690f336ef36784a1090367db48f2322e9c8 (patch)
treeafb250604b61486dbd34860700d8272c26a9217b
parent3d1dc400162210dfc6fc3d30ba66bea8eb1d1c28 (diff)
better UX on mobile when clicking close instead of the 3 bars button
-rw-r--r--modules/mooc_custom/mooc_thumbnav/js/mooc_thumbnav_outline.js8
1 files changed, 5 insertions, 3 deletions
diff --git a/modules/mooc_custom/mooc_thumbnav/js/mooc_thumbnav_outline.js b/modules/mooc_custom/mooc_thumbnav/js/mooc_thumbnav_outline.js
index d64ee08..dd7797b 100644
--- a/modules/mooc_custom/mooc_thumbnav/js/mooc_thumbnav_outline.js
+++ b/modules/mooc_custom/mooc_thumbnav/js/mooc_thumbnav_outline.js
@@ -19,11 +19,13 @@
});
}
else {
- // drop class and trigger a click to act like a toggle
- $(this).removeClass('mooc_thumbnav_outline-active');
- $(this).attr('src', $(this).attr('src').replace('outline-click.png', 'outline.png'));
$('#thumbnav_modal_close').click();
}
});
+ // visualize closing of the box
+ $('#thumbnav_modal_close').click(function(){
+ $('.thumbnav_controller img.mooc_thumbnav_outline').removeClass('mooc_thumbnav_outline-active');
+ $('.thumbnav_controller img.mooc_thumbnav_outline').attr('src', $('.thumbnav_controller img.mooc_thumbnav_outline').attr('src').replace('outline-click.png', 'outline.png'));
+ });
});
})(jQuery); \ No newline at end of file