Skip to content

Instantly share code, notes, and snippets.

View upiter-2005's full-sized avatar
🏠
Working from home

Pavel Kuchenev upiter-2005

🏠
Working from home
  • Ukraine
View GitHub Profile
@upiter-2005
upiter-2005 / Option Css Snipet.html
Last active September 11, 2019 15:16
Option Css Snipet
<label>
<select>
<option>Option 1</option>
<option>Option 2</option>
<option>Option 3</option>
</select>
</label>
<?php
if ( is_product_taxonomy() && 0 === absint( get_query_var( 'paged' ) ) ) {
$term = get_queried_object();
if ( $term && ! empty( $term->description ) ) {
// наша строка, которая может содержать в себе HTML теги
$str = $term->description;
// убираем HTML теги со строки
//$str = strip_tags($str);
<?php
$table = get_field('name_field);
if ( ! empty ( $table ) ) {
echo '<table class="table table-striped">';
if ( ! empty( $table['header'] ) ) {
echo '<thead>';
echo '<tr>';
foreach ( $table['header'] as $th ) {
$("#tel").mask("8(999) 999-9999");
$("#tel").on('click', function(){
$("#tel").get(0).setSelectionRange(2,2);
});
Here should be add jquery.maskedinput
@upiter-2005
upiter-2005 / Buy imitation script
Last active October 2, 2018 14:14
Buy imitation script
<div class="yvedw">
<div class="yved yvedf1">
<img src="https://7zet.ru/wp-content/uploads/2018/09/yico.png" alt="корзина заказов" class="yvedi">
<div class="yvedvt">
<div class="yvedt">Кирилл Остопов, г. Москва, сделал(а) заказ на сумму 1490р, число 1 шт</div>
</div>
</div>
<div class="yved yvedf1">
<img src=" https://7zet.ru/wp-content/uploads/2018/09/yico.png" alt="корзина заказов" class="yvedi">
<div class="yvedvt">
@upiter-2005
upiter-2005 / stop propagation menu
Created June 6, 2018 05:13
stop propagation menu
$(".close-calendar").on('click', function(){
$('.inter-calendar').removeClass('open');
});
$('.inter-calendar, .wpbs-widget').click(function(e){
e.stopPropagation();
});
<?php
$idObj = get_category_by_slug('c_edu');
$id = $idObj->term_id;
echo get_cat_name($id) ?>
<?php if ( have_posts() ) : query_posts('cat=' . $id);
while (have_posts()) : the_post(); ?>
<?php $large_image_url = wp_get_attachment_image_src( get_post_thumbnail_id(), 'large' );
echo $large_image_url[0]; ?>
@upiter-2005
upiter-2005 / popover-dom-content.html
Created April 27, 2018 08:09 — forked from imliam/popover-dom-content.html
Bootstrap 4 - Load Popover Content From DOM
<div id="unique-id" style="display:none;">
<div class="popover-heading">This is a heading</div>
<div class="popover-body">This is HTML content that will be loaded inside a </div>
</div>
<span tabindex="0" role="button" data-toggle="popover" data-placement="bottom" data-popover-content="#unique-id">
Click me to load a popover
</span>
@upiter-2005
upiter-2005 / Cycle change block content
Created December 29, 2017 21:39
Cycle change block content
$('.rotate-h2 .lang-block').eq(0).addClass('active').fadeIn(1000);
setInterval( function () {
var length = $('.rotate-h2 .lang-block').length - 1;
$('.rotate-h2 .lang-block').each(function(index) {
if($(this).hasClass('active') && index != length) {
$(this).removeClass('active').fadeOut(1000).next('.lang-block').addClass('active').delay(1000).fadeIn(1000);
.video
position: relative
padding-bottom: 56.25%
padding-top: 25px
height: 0
iframe
border: none
position: absolute
top: 0
left: 0