Line 397: | Line 397: | ||
} | } | ||
+ | |||
+ | /* Styles for smallnav */ | ||
+ | |||
+ | /* Clearfix */ | ||
+ | .clearfix:before, | ||
+ | .clearfix:after { | ||
+ | content: " "; | ||
+ | display: table; | ||
+ | } | ||
+ | .clearfix:after { | ||
+ | clear: both; | ||
+ | } | ||
+ | .clearfix { | ||
+ | *zoom: 1; | ||
+ | } | ||
+ | |||
+ | <script> | ||
+ | // FOR SMALLNAV | ||
+ | $(function() { | ||
+ | var pull = $('#pull'); | ||
+ | menu = $('#smallnav ul'); | ||
+ | menuHeight = menu.height(); | ||
+ | |||
+ | $(pull).on('click', function(e) { | ||
+ | e.preventDefault(); | ||
+ | menu.slideToggle(); | ||
+ | }); | ||
+ | |||
+ | $(window).resize(function(){ | ||
+ | var w = $(window).width(); | ||
+ | if(w > 320) { | ||
+ | if (menu.is(':hidden')) { | ||
+ | menu.removeAttr('style'); | ||
+ | } | ||
+ | } | ||
+ | }); | ||
+ | }); | ||
+ | </script> | ||
</style> | </style> |
Revision as of 11:52, 31 July 2018