Skip to content

Instantly share code, notes, and snippets.

View zdimaz's full-sized avatar
😄

zdimaz

😄
View GitHub Profile
@zdimaz
zdimaz / jq fn
Created August 29, 2019 20:29
parralax jq fn
$(document).ready(function(){
$('section[data-type="background"]').each(function(){
var $bgobj = $(this); // создаем объект
$(window).scroll(function() {
var ypos = -($window.scrolltop() / $bgobj.data('speed')); // вычисляем коэффициент
// присваиваем значение background-position
var coords = 'center '+ ypos + 'px';
// создаем эффект parallax scrolling
$bgobj.css({ backgroundposition: coords });
@zdimaz
zdimaz / js
Last active November 11, 2019 12:58
table slinky plugin
/* basic table sticky*/
.wrapp_table_sticky{
overflow: hidden;
}
.wrapp_table_sticky .inner_table_sticky{
overflow: auto;
padding: 20px 0;
margin: -20px 0;
@zdimaz
zdimaz / script.plugins.js
Created May 12, 2020 08:39
jq ajax form simple
/* ==============================================
Name function
============================================== */
if($("form").length){
$('form').submit(function(e) {
e.preventDefault();
@zdimaz
zdimaz / disabled write words to input
Last active July 28, 2021 08:41
disabled write words to input
.replace(/[^0-9]/g, '');
exapmle
var val = $(this).prop("value").replace(/[^0-9]/g, '');
/**
** Input Number
**/
inputNumber: function(){
@zdimaz
zdimaz / The Wizard of Oz, 1939
Last active December 21, 2021 11:46
emits vue 3 js
<!--
From the child component, you want to do an "emit".
This tells the parent to run the callback specified
in the child component reference. Psuedo code:
-->
<child>
<button @click="send()">Click Me</button>
methods: {