Skip to content

Instantly share code, notes, and snippets.

View alexermakov's full-sized avatar

ermakovalexey alexermakov

View GitHub Profile
@alexermakov
alexermakov / ancor-scroll.js
Last active April 11, 2016 08:22
scroll for ancors
$('a[href^="#"], a[href^="."]').click( function(){
var scroll_el = $(this).attr('href');
if ($(scroll_el).length != 0) {
$('html, body').animate({ scrollTop: $(scroll_el).offset().top }, 1000);
}
return false;
});
<?php
if ($_POST){
function mime_header_encode($str, $data_charset, $send_charset) {
if($data_charset != $send_charset)
$str=iconv($data_charset,$send_charset.'//IGNORE',$str);
return ('=?'.$send_charset.'?B?'.base64_encode($str).'?=');
}
class TEmail {
.clearfix:after {
visibility: hidden;
display: block;
content: " ";
height: 0;
font-size: 0;
clear: both
}
@alexermakov
alexermakov / normalize.css
Last active March 11, 2017 11:03
normalize.css
/*! normalize.css v3.0.3 | MIT License | github.com/necolas/normalize.css */
/**
* 1. Set default font family to sans-serif.
* 2. Prevent iOS and IE text size adjust after device orientation change,
* without disabling user zoom.
*/
html {
<script src="https://code.jquery.com/jquery-2.1.4.min.js"></script>
/*! jQuery v2.1.4 | (c) 2005, 2015 jQuery Foundation, Inc. | jquery.org/license */
!function(a,b){"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){var c=[],d=c.slice,e=c.concat,f=c.push,g=c.indexOf,h={},i=h.toString,j=h.hasOwnProperty,k={},l=a.document,m="2.1.4",n=function(a,b){return new n.fn.init(a,b)},o=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,p=/^-ms-/,q=/-([\da-z])/gi,r=function(a,b){return b.toUpperCase()};n.fn=n.prototype={jquery:m,constructor:n,selector:"",length:0,toArray:function(){return d.call(this)},get:function(a){return null!=a?0>a?this[a+this.length]:this[a]:d.call(this)},pushStack:function(a){var b=n.merge(this.constructor(),a);return b.prevObject=this,b.context=this.context,b},each:function(a,b){return n.each(this,a,b)},map:function(a){return this.pushStack(n.map(this,function(b,c){return a.call(b,
$(document).ready(function() {
$('.js_form_mail').submit(function( event ) {
if ($(this)[0].checkValidity()) {
formx = $(this).serialize();
formxa = $(this).serializeArray();
$.ajax({
type: "POST",
url: themePath+"/obr.php",
data: formx,
<!-- start style -->
<style type="text/css">
.alModal {
width: 90%;
max-width: 280px;
height:auto;
display: none;
position: fixed;
z-index: 100;
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="description" content="" />
<meta name="keywords" content="" />
<meta name="viewport" content="width=device-width, user-scalable=yes">
<title>Document</title>
<link rel="stylesheet" href="css/normalize.css" />
<link rel="stylesheet" href="css/style.css" />
<!-- start style -->
<style type="text/css">
.alModal {
width: 90%;
max-width: 280px;
height:auto;
display: none;
position: fixed;
z-index: 100;
font-family: sans-serif;