Underscore是一个非常实用的JavaScript库,提供许多编程时需要的功能的支持,他在不扩展任何JavaScript的原生对象的情况下提供很多实用的功能,需要了解的朋友可以详细参考下
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>Underscore</title>
<meta name="viewport" content="width=device-width,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no"/>
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="format-detection" content="telephone=no"/>
<link href="index.css" rel="stylesheet" type="text/css" />
<script src="jquery.js"></script>
<script src="underscore.js"></script>
</head>
<body>
</body>
</html>
<!--ace-template demo-->
<script >
$('.ul').hide();
$('.ul>li:last-child').addClass('last-li');
$('body>div:first-child>ul').show();
$('.title').click(function(){
$(this).siblings().toggle();
$(this).parent().siblings().children('.bbs-nav-ul').hide();
}) $('.title').hover(function(){
$(this).toggleClass('hover');
})
$('.ul>li').hover(function(){
$(this).toggleClass('hover');
})
</script