Mercurial > sat_docs
comparison printable_cards/xhtml/cmc/specimen_files/easytabs.js @ 5:dfc5c6be7761
add xhtml template for printing "business" (visiting) cards:
The output is made for being printed on DECAdry SCW-2090.
To print it, it's better to export it first to PDF from your browser.
Be sure you disabled all the margins, header and footer set by the browser.
author | souliane <souliane@mailoo.org> |
---|---|
date | Thu, 03 Jul 2014 12:21:45 +0200 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
4:a6af040be754 | 5:dfc5c6be7761 |
---|---|
1 (function($){$.fn.easyTabs=function(option){var param=jQuery.extend({fadeSpeed:"fast",defaultContent:1,activeClass:'active'},option);$(this).each(function(){var thisId="#"+this.id;if(param.defaultContent==''){param.defaultContent=1;} | |
2 if(typeof param.defaultContent=="number") | |
3 {var defaultTab=$(thisId+" .tabs li:eq("+(param.defaultContent-1)+") a").attr('href').substr(1);}else{var defaultTab=param.defaultContent;} | |
4 $(thisId+" .tabs li a").each(function(){var tabToHide=$(this).attr('href').substr(1);$("#"+tabToHide).addClass('easytabs-tab-content');});hideAll();changeContent(defaultTab);function hideAll(){$(thisId+" .easytabs-tab-content").hide();} | |
5 function changeContent(tabId){hideAll();$(thisId+" .tabs li").removeClass(param.activeClass);$(thisId+" .tabs li a[href=#"+tabId+"]").closest('li').addClass(param.activeClass);if(param.fadeSpeed!="none") | |
6 {$(thisId+" #"+tabId).fadeIn(param.fadeSpeed);}else{$(thisId+" #"+tabId).show();}} | |
7 $(thisId+" .tabs li").click(function(){var tabId=$(this).find('a').attr('href').substr(1);changeContent(tabId);return false;});});}})(jQuery); |