
$('#home-nav-wrap').height($('#home-nav').height());
$('#home-nav').affix({
    offset: $('#home-nav').position()
});

// $(document).ready(function() {
//     var width = $(window).width();
//     if (width <= 768) {
    	

//         } else {
//         $('#home-nav.affix-top #nav-row').collapse('show');
//         $('#home-nav.affix #nav-row').collapse('show');


//     };
// })

$(document).ready(function() {

$(window).resize(function() {
    var width = $(window).width();
    if (width <= 768) {
    	
        $('#home-nav.affix-top #nav-row').collapse('show');
        $('#home-nav.affix #nav-row').collapse('hide');

        } else {
        $('#home-nav.affix-top #nav-row').collapse('show');
        $('#home-nav.affix #nav-row').collapse('show');


    };
})

$(window).scroll(function() {
    var width = $(window).width();
    if (width <= 768) {
    	
        $('#home-nav.affix-top #nav-row').collapse('show');
        $('#home-nav.affix #nav-row').collapse('hide');

        } else {
        $('#home-nav.affix-top #nav-row').collapse('show');
        $('#home-nav.affix #nav-row').collapse('show');


    };
})
});
@@ -123,712 +123,40 @@
 %0D%0A%0D%0A
-// $(document).ready(function() %7B%0D%0A//     var width = $(window).width();%0D%0A//     if (width %3C= 768) %7B%0D%0A    %09%0D%0A%0D%0A//         %7D else %7B%0D%0A//         $('#home-nav.affix-top #nav-row').collapse('show');%0D%0A//         $('#home-nav.affix #nav-row').collapse('show');%0D%0A%0D%0A%0D%0A//     %7D;%0D%0A// %7D)%0D%0A%0D%0A$(document).ready(function() %7B%0D%0A%0D%0A$(window).resize(function() %7B%0D%0A    var width = $(window).width();%0D%0A    if (width %3C= 768) %7B%0D%0A    %09%0D%0A        $('#home-nav.affix-top #nav-row').collapse('show');%0D%0A        $('#home-nav.affix #nav-row').collapse('hide');%0D%0A%0D%0A        %7D else %7B%0D%0A        $('#home-nav.affix-top #nav-row').collapse('show');%0D%0A        $('#home-nav.affix #nav-row').collapse('show');%0D%0A%0D%0A%0D%0A    %7D;%0D%0A%7D)%0D%0A%0D%0A$(window).scroll(
+$(window).bind(%22resize scroll%22, 
 func
@@ -230,15 +230,8 @@
  %7B%0D%0A
-    %09%0D%0A
     
@@ -346,150 +346,8 @@
 e');
-%0D%0A%0D%0A        %7D else %7B%0D%0A        $('#home-nav.affix-top #nav-row').collapse('show');%0D%0A        $('#home-nav.affix #nav-row').collapse('show');%0D%0A%0D%0A
 %0D%0A  
@@ -356,11 +356,9 @@
 %7D;%0D%0A
-%7D)%0D%0A
 %7D);
+%0D%0A

Improve nav bar for mabile