Skip to content

Commit

Permalink
Prevented the content menu from closing when the mouse click is insid…
Browse files Browse the repository at this point in the history
…e the menu itself.
  • Loading branch information
cindyli committed Mar 7, 2013
1 parent 56e8059 commit a3ab071
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions jscripts/mobile.js
Expand Up @@ -20,11 +20,13 @@ ATutor.mobile = ATutor.mobile || {};
(function ($) {
jQuery(document).ready(function () {
// any click on the page closes the content menu but the link "content_link" itself
$(document).click(function () {
$(document).click(function (e) {
// hide content menu
$('#content').slideUp(600);
$('#content_link').removeClass('content_link_tablet_highlight triangle-isosceles top right');
$('#content_link_phone').removeClass('topnavlist-link-highlight content-closed');
if ($('#content').has("#" + e.target.id).length === 0) {
$('#content').slideUp(600);
$('#content_link').removeClass('content_link_tablet_highlight triangle-isosceles top right');
$('#content_link_phone').removeClass('topnavlist-link-highlight content-closed');
}

// hide navigation menu
$('#navigation-column').slideUp(200);
Expand Down

0 comments on commit a3ab071

Please sign in to comment.