Skip to content

Commit

Permalink
Fixed menu again
Browse files Browse the repository at this point in the history
Fixed some lingering issues with the menu.

Added responsive design using jQuery.  Note this will only work on the
initial refresh, so test by resizing your window, then refreshing.
  • Loading branch information
srsgores authored and richtera committed Jan 5, 2013
1 parent 7933b51 commit 7a20c12
Show file tree
Hide file tree
Showing 4 changed files with 119 additions and 65 deletions.
134 changes: 72 additions & 62 deletions .idea/workspace.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

45 changes: 42 additions & 3 deletions themes/core/cleanslate/public/js/cleanslate-core.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,23 @@ cleanslate = {
}
},
backlog: [],
init: function ()
setResponsiveMenu: function ()
{
if (Modernizr.mq("media handheld, only screen and (max-width: 767px)")) {
console.log("Doing menu resize...");
var $menus = $("ul.menu");
var $menuItems = $menus.find("li");
$menuItems.toggle();
var $responsiveMenuItemTitle = "<li class='menu-item'><a href='#' class='showMenuItems'><i class='icon-list-2 responsive-logo'></i></a> </li> ";

$menus.append($responsiveMenuItemTitle).on('click', function (e)
{
e.preventDefault();
$menuItems.toggle("slow");
$(this).find(".responsive-logo").toggleClass("icon-minus-2");
});
}
}, init: function ()
{

// HIDE/SHOW USER LOGIN FORM
Expand Down Expand Up @@ -218,10 +234,33 @@ cleanslate = {
});

// REMOVE ANNOYING TITLE TOOLTIPS FROM MENUS
$('.menu a').each(function (i, node)
/*$('.menu a').each(function (i, node)
{
node.title = "";
});
});*/

this.setResponsiveMenu();
/*$(".menu li li").toggle("slow").parent().on('hover', function (e)
{
$(this).find("li").toggle("slow");
});*/

if (Modernizr.mq('only screen and (max-width: 767px)')) {
console.log("Doing menu resize...");
var $menus = $("ul.menu");
var $menuItems = $menus.find("li");
$menuItems.toggle();
var $responsiveMenuItemTitle = "<li class='menu-item'><a href='#' class='showMenuItems'><i class='icon-list-2 responsive-logo'></i></a> </li> ";

$menus.append($responsiveMenuItemTitle).on('click', function (e)
{
e.preventDefault();
$menuItems.toggle("slow");
$(this).find(".responsive-logo").toggleClass("icon-minus-2");
});
}



} // end of cleanslate.init

Expand Down
Loading

0 comments on commit 7a20c12

Please sign in to comment.