Skip to content

Instantly share code, notes, and snippets.

View sukhikh18's full-sized avatar
💪
Business, Development, Sales, Marketing

Nick Sergeevich sukhikh18

💪
Business, Development, Sales, Marketing
View GitHub Profile
@sukhikh18
sukhikh18 / magniflier.js
Last active August 9, 2018 09:41
Image magniflier
$.magniflier = function( target, style ) {
if( !target ) return false;
var style = style || false;
var native_width = 0;
var native_height = 0;
var mouse = {x: 0, y: 0};
var $curImg;
var ui = {
@sukhikh18
sukhikh18 / border-style-triangles.svg.scss
Last active August 20, 2018 19:11
Svg dotted triangles border
// <!-- IE polyfill -->
// <!-- <script type="text/javascript" src="assets/polyfill-svg-uri/polyfill-svg-uri.min.js"></script> -->
/**
* Color
* Width
* Height
* Svg path (left,bottom center,top right,bottom)
*
* Use %23 instend # for the FF
// <!-- IE and EDGE unsupported -->
@mixin transparent-gradient-mask($direction: 'to bottom', $from: rgba(0,0,0,1), $to: rgba(0,0,0,0)) {
// -webkit-mask-image: -webkit-gradient(linear, 0% 0%, 0% 100%, from(rgba(0,0,0,1)), to(rgba(0,0,0,0)));
-webkit-mask-image: linear-gradient(unquote($direction), $from, $to);
mask-image: linear-gradient(unquote($direction), $from, $to);
}
.pane {
position: relative;
display: block;
$dbBasketItems = CSaleBasket::GetList(
array("ID" => "ASC"),
array(
'FUSER_ID' => CSaleBasket::GetBasketUserID(),
'LID' => SITE_ID,
'ORDER_ID' => 'NULL'
),
false,
false,
@sukhikh18
sukhikh18 / scrollIn.js
Last active April 29, 2020 08:37
On scroll element appear. Use: $(this).scrollIn()
$.fn.scrollIn = function() {
var $window = $(window),
scrollTop = $window.scrollTop(),
viewport = {
top: scrollTop,
bottom: scrollTop + $window.height()
},
bounds = this.offset();
bounds.bottom = bounds.top + this.outerHeight();
<?if (!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED !== true)die();
/**
* New bitrix checkout component
*/
use \Bitrix\Main\Localization\Loc;
use \Bitrix\Main\Loader;
class customOrderComponent extends CBitrixComponent
@sukhikh18
sukhikh18 / Show once
Last active February 20, 2019 07:56
Once do action via cookies
var cookieName = 'oncePopup';
// if cookie exists
if( 0 < getCookie(cookieName) ) return;
var date = new Date(new Date().getTime() + 1 * 60 * 60 * 1000); // 1 hour
document.cookie = cookieName + "=1; path=/; expires=" + date.toUTCString();
function getCookie(name) {
var matches = document.cookie.match(new RegExp(
"(?:^|; )" + name.replace(/([\.$?*|{}\(\)\[\]\\\/\+^])/g, '\\$1') + "=([^;]*)"
<?php
use CommerceMLParser\Parser,
CommerceMLParser\Event;
require 'vendor/autoload.php';
class CommerceMLParser
{
public $arCategory = array();
@sukhikh18
sukhikh18 / preloader.js
Last active February 15, 2019 05:49
Easy fancybox preloader
var preloaderClass = 'fb-loading';
window.showPreloader = function( message ) {
if(!message) message = 'Загрузка..';
$preload = $('<p>'+ message +'</p>').css({
'margin-top': '50px',
'margin-bottom': '-40px',
'padding-bottom': '',
'color': '#ddd'
});;
@sukhikh18
sukhikh18 / slick.init.js
Created February 15, 2019 06:03
Own slick initialize method
/********************************* Slick **********************************/
window.slickSlider = function(target, props) {
var _defaults = {
autoplay: true,
autoplaySpeed: 4000,
dots: true,
infinite: false,
slidesToShow: 4,
slidesToScroll: 4,
responsive: [