Skip to content

Instantly share code, notes, and snippets.

View Waidoss's full-sized avatar

Александр Соколов Waidoss

View GitHub Profile
<snippet>
<content><![CDATA[
<!-- begin $1 -->
<div class="$1">
$2
</div>
<!-- end $1 -->
]]></content>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>di</tabTrigger>
@Waidoss
Waidoss / common.js
Created August 9, 2018 15:22
Split text and wrap to span all word
// Page index, split description text for gsap "staggerFrom"
var text = $('#design').text(),
splitSpace = text.split(' '),
wordsArray = [];
counter = 1;
$(splitSpace).each(function(i){
markup = '<span class="span-'+ counter +'"> ' + splitSpace[i] + ' </span>';
wordsArray.push(markup);
counter += 1;
});
@Waidoss
Waidoss / scroll-to-top-sass
Created April 24, 2017 14:21
scroll-to-top-sass
.top
background-color: $accent-color
display: inline-block
width: 40px
height: 40px
border-radius: 10em
position: fixed
z-index: 999
top: 60%
right: -60px
@Waidoss
Waidoss / scroll_to_top.js
Created February 6, 2017 21:19
scroll_to_top
$(function() {
// Поскольку кнопка за аппендена то делаем через ON
$("body").on("click", ".top", function() {
$("html, body").animate({scrollTop: 0}, "slow");
});
$("body").append('<div class="top">^');
// Функция скроллинга странички, добавляем класс active к заапенденной .top кнопке, если высота окна
//больше его первоначальнойвысоты...
@Waidoss
Waidoss / start.jQuery.plugin.js
Last active November 13, 2016 20:12
jQuery plugin start
// первоначальная структура любого плагина
(function($) {
$.fn.myParallax = function() {
return this.each(function() {
var ths = $(this);
@Waidoss
Waidoss / migx-sample.js
Created September 28, 2016 18:39 — forked from agragregra/migx-sample.js
MIGX Sample
Tabs:
[
{"caption":"Tab Title", "fields": [
{"field":"title","caption":"Name"},
{"field":"description","caption":"Description","inputTVtype":"textarea"},
{"field":"imageTV","caption":"Photo","inputTV":"imageTV"}
]}
]
Table:
SASS:
.mfp-ready .mfp-figure
opacity: 0
.mfp-zoom-in
.mfp-figure, .mfp-iframe-holder .mfp-iframe-scaler
opacity: 0
transition: all 0.3s ease-out
transform: scale(0.95)
&.mfp-bg, .mfp-preloader
opacity: 0
<style>
/* ---------------------------------------------- /*
* Mouse animate icon
/* ---------------------------------------------- */
.mouse-icon {
border: 2px solid #000;
border-radius: 16px;
height: 40px;
width: 24px;
display: block;
<!-- HTML -->
<a href="#" class="toggle-mnu hidden-lg"><span></span></a>
<!-- SASS -->
.toggle-mnu
display: block
width: 28px
height: 28px
margin-top: 14px
@Waidoss
Waidoss / httpd-vhost.conf
Last active April 1, 2016 20:42 — forked from agragregra/httpd-vhost.conf
XAMPP httpd-vhost.conf
<VirtualHost *:80>
DocumentRoot "/Applications/XAMPP/xamppfiles/htdocs/"
ServerName localhost
<Directory "/Applications/XAMPP/xamppfiles/htdocs/">
Options Indexes FollowSymLinks Includes execCGI
AllowOverride All
Require all granted
</Directory>
</VirtualHost>