View .gitignore
# Compiled source #
###################
*.com
*.class
*.dll
*.exe
*.o
*.so
# Packages #
View tab.js
/*Note: add class "tabSet1" or "tabSet2" after ul.tabs and tab-content */
function tab(x) {
var a = $('ul.tabs.' + x + ' ' + 'li');
a.click(function () {
var tab_id = $(this).attr('data-tab');
a.removeClass('active');
$('.tab-content.' + x).removeClass('active');
$(this).addClass('active');
View Position-in-Middle.js
//It will work for the element that has position: relative
function postionMiddle(e) {
var capHeightHalf = $(e).innerHeight() / 2,
capParentHeightHalf = $(e).parent().innerHeight() / 2,
capPosition = capParentHeightHalf - capHeightHalf;
$(e).css("top", capPosition );
}
postionMiddle(".caption"); // place your element instead .caption
View SocialMediaTag.html
Product Social Media Tag Template
<!-- Update your html tag to include the itemscope and itemtype attributes. -->
<html itemscope itemtype="http://schema.org/Product">
<!-- Place this data between the <head> tags of your website -->
<title>Page Title. Maximum length 60-70 characters</title>
<meta name="description" content="Page description. No longer than 155 characters." />
<!-- Schema.org markup for Google+ -->
View tmpClass.js
$(document).ready(function () {
$.fn.extend({
tmpClass: function (className, duration) {
var elements = this;
setTimeout(function () {
elements.removeClass(className);
}, duration);
return this.each(function () {
View svg.js
/*
* Replace all SVG images with inline SVG
*/
//if img has svg, change it!
jQuery('img').filter(function() {
return this.src.match(/.*\.svg$/);
}).each(function(){
var $img = jQuery(this);
var imgID = $img.attr('id');