Skip to content

Instantly share code, notes, and snippets.

<!DOCTYPE html>
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<style type="text/css">
@media screen and (max-width: 480px) {
.mobile-hide {
window._myAwesomeScripts = function() {
alert('Я гений джаваскрипта');
}
@Zagorakiss
Zagorakiss / gist:9732c7fc9c296313b00611119862db4c
Last active October 21, 2016 23:15
В отдельном js, подключенном к странице
var INTOJOB = INTOJOB || {};
$(window).on('load',function() {
if ( window.clientTemplate ) {
switch ( window.clientTemplate ) {
case 'profile/client/analytics/vacancy':
var INTOJOB.specialPage = window._myAwesomeScripts;
case 'contacts':
var INTOJOB.specialPage = window._theAnotherAwesomeScripts;
break;
@Zagorakiss
Zagorakiss / clientTemplate
Last active October 21, 2016 23:17
На странице (параметр для route)
<script>
if ( !window.clientTemplate ) {
window.clientTemplate = 'profile/client/analytics/vacancy';
}
</script>
@Zagorakiss
Zagorakiss / v-selectize.js
Created July 6, 2016 11:19 — forked from james2doyle/v-selectize.js
Selectize dropdown and tags directives for Vue.js
// usage: v-selectize-dropdown="dataKeyToBindTo"
Vue.directive('selectize-dropdown', {
twoWay: true,
priority: 1000,
bind: function () {
var self = this;
$(this.el).selectize({
create: true,
sortField: 'text',
onChange: function (val) {
@Zagorakiss
Zagorakiss / obj-responsive.js
Created January 21, 2016 01:00
Object for Responsive markup
var responsive = {
xs: function() {
// Сделать что-то
},
sm: function() {
// Сделать что-то
},
md: function() {
// Сделать что-то
},
@Zagorakiss
Zagorakiss / pointer-events.js
Created December 3, 2015 16:19
simple pointer events - js boilerplate
"use strict";
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
console.clear();
var SVGNS = "http://www.w3.org/2000/svg",
XLINKNS = "http://www.w3.org/1999/xlink",
TAU = 2 * Math.PI,
SYS_FONTS = "-apple-system, '.SFNSText-Regular', 'San Francisco', 'Roboto', 'Segoe UI', 'Helvetica Neue', 'Lucida Grande', sans-serif",