$(window).scroll(function() {
if ($(this).scrollTop() > 230) { $("nav").css({ "position": "fixed", "top": 0 }); } else { $("nav").css({ "position": "absolute", "top": "230px" }); }
});