当前位置:首页 > 设计素材 > 单页模版 >

博客杂志UI工具包 模板

时间:2014-06-26 08:24 来源:互联网 作者:源码搜藏 收藏

  • 源码类别:单页模版
  • 源码大小:396 KB
  • 广告推荐
在线演示立即下载

博客杂志UI工具包 模板博客杂志UI工具包 模板是一款紫色扁平样式的博客模板UI工具包。博客杂志紫色工具包



<script>
// Wait until the DOM has loaded before querying the document
$(document).ready(function(){
$('ul.news-tabs').each(function(){
// For each set of tabs, we want to keep track of
// which tab is active and it's associated content
var $active, $content, $links = $(this).find('a');
// If the location.hash matches one of the links, use that as the active tab.
// If no match is found, use the first link as the initial active tab.
$active = $($links.filter('[href="'+location.hash+'"]')[0] || $links[0]);
$active.addClass('active');
$content = $($active.attr('href'));
// Hide the remaining content
$links.not($active).each(function () {
$($(this).attr('href')).hide();
});
// Bind the click event handler
$(this).on('click', 'a', function(e){
// Make the old tab inactive.
$active.removeClass('active');
$content.hide();
// Update the variables with the new link and content
$active = $(this);
$content = $($(this).attr('href'));
// Make the tab active.
$active.addClass('active');
$content.show();
// Prevent the anchor's default click action
e.preventDefault();
});
});
});
</script>

本站资源仅限于学习研究,严禁从事商业或者非法活动! 源码搜藏网所有源码来自互联网转载与用户上传分享,如果侵犯了您的权益请与我们联系,我们将在24小时内删除!谢谢!

单页模版下载排行

最新文章