Skip to content

Instantly share code, notes, and snippets.

@Yelakelly
Yelakelly / YandexMapShortcode.markdown
Last active March 1, 2016 16:31
Wordpress Shortcode - YandexMap

Wordpress Shortcode - YandexMap.

Add YandexMap on the page.

Settings:

  • x - longitude
  • y - latitude
  • height - height of map (Default: 400px)

Pure CSS Block Hiding.

Send form via ajax.

@Yelakelly
Yelakelly / README.MD
Created April 22, 2016 22:38
TinyPng - compression of all files in catalog

TinyPng

TinyPng - compression of all files in catalog.

All optimized images will go in "optimized" folder.

@Yelakelly
Yelakelly / README.MD
Created August 15, 2016 10:38
Vue.js - simple multiple file upload

Vue.js - simple multiple file upload

@Yelakelly
Yelakelly / main.js
Last active November 14, 2016 18:43
YandexMap - (with icon)
ymaps.ready(function () {
var myMap = new ymaps.Map('map', {
center: [55.7404033, 37.5913301],
zoom: 15,
controls: []
});
myMap.geoObjects
.add(new ymaps.Placemark([55.7404033, 37.5913301], {
@Yelakelly
Yelakelly / Equal column height - jQuery snippet.js
Last active November 9, 2016 22:30
Equal column height - jQuery snippet
function equalColumnHeight(_item){
var minHeight = _item.first().height();
_item.each(function(){
_height = $(this).height();
if(minHeight < _height){
minHeight = $(this).height();
}
});
@Yelakelly
Yelakelly / Scroll to elem - jQuery snuppet
Created November 10, 2016 12:24
Scroll to elem - jQuery snuppet
function scrollTo(item, offset){
offset = offset ? offset : 0;
$('html, body').animate({
scrollTop: $(item).offset().top - 0
}, 1000);
}
$('.js-nav-link').on('click', function(e){
var elem = $(this).attr('href');
@Yelakelly
Yelakelly / index.html
Created November 23, 2016 10:14
Placeholder animate - Sass mixin
<input type="text" placeholder="It's here" />
@Yelakelly
Yelakelly / main.js
Created December 14, 2016 15:42
YandexMap snippet - route, offset, drag disabled on mobile
ymaps.ready(function () {
var pointA = "Смоленская метро",
pointB = "ул. Арбат д.51 , стр.1",
/**
* Создаем мультимаршрут.
* @see https://api.yandex.ru/maps/doc/jsapi/2.1/ref/reference/multiRouter.MultiRoute.xml
*/
multiRoute = new ymaps.multiRouter.MultiRoute({
referencePoints: [
pointA,