Skip to content

Instantly share code, notes, and snippets.

@eksana
eksana / css
Created December 1, 2017 07:52
css-circul
<ul class='circle-container'>
<li><img src='http://allswalls.com/images/orange-cat-wallpaper-11.jpg'></li>
<li><img src='http://allswalls.com/images/orange-cat-wallpaper-11.jpg'></li>
<li><img src='http://allswalls.com/images/orange-cat-wallpaper-11.jpg'></li>
<li><img src='http://allswalls.com/images/orange-cat-wallpaper-11.jpg'></li>
<li><img src='http://allswalls.com/images/orange-cat-wallpaper-11.jpg'></li>
<li><img src='http://allswalls.com/images/orange-cat-wallpaper-11.jpg'></li>
<li><img src='http://allswalls.com/images/orange-cat-wallpaper-11.jpg'></li>
<li><img src='http://allswalls.com/images/orange-cat-wallpaper-11.jpg'></li>
</ul>
@eksana
eksana / css
Created October 19, 2017 10:21
hover_grid
<h1>Hover around the boxes below</h1>
<div class="container">
<div class="row">
<div class="col">
<div class="photo-container" style="background-image:url(https://source.unsplash.com/600x250/?sig=266)"></div>
<h2>Image 266 </h2>
<div class="slide">
<p>Doloremque quisquam molestias, est laudantium vero aliquid dolorum inventore atque sint perferendis qui dolor voluptas consequuntur non.</p>
</div>
@eksana
eksana / za_cursorom2
Created September 19, 2017 06:19
za_cursorom2
// <![CDATA[
var colour="random"; // in addition to "random" can be set to any valid colour eg "#f0f" or "red"
var sparkles=50;
var x=ox=400;
var y=oy=300;
var swide=800;
var shigh=600;
var sleft=sdown=0;
var tiny=new Array();
@eksana
eksana / js
Created September 19, 2017 06:10
za_cursorom
<script type="text/javascript">
var text = 'http://usefulscript.ru/flying_cursor_text.php';
var gap = 9;
ns4 = (navigator.appName.indexOf("Netscape")>=0 && document.layers)? true : false;
ie4 = (document.all && !document.getElementById)? true : false;
ie5 = (document.all && document.getElementById)? true : false;
ns6 = (document.getElementById && navigator.appName.indexOf("Netscape")>=0 )?
true: false;
var the_text = new Array();
@eksana
eksana / jquery
Created June 27, 2017 06:46
скролл к якорю
$(document).ready(function() {
$('a[href^="#"]').click(function () {
elementClick = $(this).attr("href");
destination = $(elementClick).offset().top;
if($.browser.safari){
$('body').animate( { scrollTop: destination }, 1100 );
}else{
$('html').animate( { scrollTop: destination }, 1100 );
}
return false;
@eksana
eksana / css
Created June 8, 2017 09:02
радиокнопки в группе
HTML Radio Button Tag
Code to create radio button in html?
How to create pre selected radio button (checked)?
How to disable (non selectable) radio button?
Explanation
Radio Button
@eksana
eksana / .htaccess wp
Created May 26, 2017 17:22
Перенос сайта на хостинг
Было на локальном хостинге
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /WPAvto/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /WPAvto/index.php [L]
</IfModule>
@eksana
eksana / php
Created May 14, 2017 16:45
Прикручиваем лендинг к странице записей
Необходимо открыть файл функций шаблона functions.php и сразу после <?php с новой строки вставим такое:
/* шаблон одиночной записи */
function mojwp_single($mojwp_template) {
global $wp_query, $post;
if(file_exists(TEMPLATEPATH . '/single-' . $post->ID . '.php')) {
return TEMPLATEPATH . '/single-' . $post->ID . '.php';
}
if(file_exists(TEMPLATEPATH . '/single.php')) {
return TEMPLATEPATH . '/single.php';
@eksana
eksana / jq
Created May 11, 2017 07:34
Добавляем разные новые классы
<ul>
<li class="liclass"></li>
<li class="liclass"></li>
<li class="liclass"></li>
<li class="liclass"></li>
<li class="liclass"></li>
</ul>
$(function(){
$('li').each(function(i){
var $tc = $(this).attr('class')
@eksana
eksana / php
Created May 11, 2017 03:52
Отправка почты с ajax
Для начала напишем простую форму отправки на HTML:
<form id="form">
<input type="text" name="name" required="required"/>
<input type="text" name="phone" required="required"/>
<input type="submit" value="Заказать звонок"/>
</form>
Для обязательных полей указываем: