doctype 5
html
block link
-var selected = 'home'; //default
-var menu = { 'home': '/home', 'blog': '/blog', 'contact': '/contact' };
body
nav
ul
each val, key in menu
li
if selected === key
a.selected(href=val, title=key)= key
else
a(href=val, title=key)= key
extends parent
block link
-var selected = 'blog';
$(function(){
var navMain = $(".navbar-collapse");
navMain.on("click", "a", null, function () {
navMain.collapse('hide');
});
});
ctrl+shift+p
не видеть лишних строк:{
"ignored_packages":
[
"ActionScript",
"AppleScript",
"ASP",
"Batch File",
"C#",
"C++",
"Clojure",
"D",
"Erlang",
"Go",
"Graphviz",
"Groovy",
"Haskell",
"LaTeX",
"Lisp",
"Lua",
"Makefile",
"MATLAB",
"Objective-C",
"OCaml",
"Perl",
"Python",
"PyV8",
"R",
"Scala",
"ShellScript",
"TCL",
"Textile",
"Vintage"
],
}
<link rel="prefetch" href="/path/to/prefetch" />
$(function() {
$('div#fds img').each(function(i) {
$(this).delay((i++) * 500).fadeTo(1000, 1); })
});
background-size
jQuery(function($) {
function fixDiv() {
var $cache = $('#fixed');
if ($(window).scrollTop() > 50)
$cache.css({
'position': 'fixed',
'top': '0px'
});
else
$cache.css({
'position': 'relative',
});
}
$(window).scroll(fixDiv);
fixDiv();
});