This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Theme Name: Theme name | |
Theme URI: theme url | |
Description: Демонстрационная тема, созданная благодаря Bootstrap. | |
Author: Ya! | |
Author URI: url | |
Version: 1.0 | |
Tags: responsive, white, bootstrap | |
License: Attribution-ShareAlike 3.0 Unported (CC BY-SA 3.0) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<form id="form" target="_self" onsubmit="window.location.href = 'success.html'" action="javascript: postContactToGoogle()"> | |
<h3>Заполните форму,<br>чтобы учавствовать</h3> | |
<input type="text" id="field_name" placeholder="ФИО" name="entry.68995314"> | |
<input type="text" id="field_vk" placeholder="Профиль вк" name="entry.314480333"> | |
<input type="text" id="field_email" placeholder="Почта" name="entry.2144067535"> | |
<button type="submit">Перейти к оплате</button> | |
</form> | |
<script type="text/javascript"> | |
function validateEmail(email) { | |
var re = /^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var isMobile = false; | |
if ($('body').width() <= 767) { | |
isMobile = true; | |
} | |
if (isMobile) { | |
} | |
if (!isMobile) { | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
var w = window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth; | |
if (navigator.userAgent.match(/Tablet|iPad/i) || ( navigator.userAgent.match(/Mobile|Windows Phone|Lumia|Android|webOS|iPhone|iPod|Blackberry|PlayBook|BB10|Opera Mini|\bCrMo\/|Opera Mobi/i) && w >= 767 )) | |
{ | |
// do tablet stuff | |
} else if(navigator.userAgent.match(/Mobile|Windows Phone|Lumia|Android|webOS|iPhone|iPod|Blackberry|PlayBook|BB10|Opera Mini|\bCrMo\/|Opera Mobi/i) ) | |
{ | |
// do mobile stuff | |
} else { | |
// do desktop stuff |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(document).ready(function(){ | |
$('.go_to').click( function(){ // ловим клик по ссылке с классом go_to | |
var scroll_el = $(this).attr('href'); // возьмем содержимое атрибута href | |
if ($(scroll_el).length != 0) { // проверим существование элемента чтобы избежать ошибки | |
$('html, body').animate({ scrollTop: $(scroll_el).offset().top }, 500); // анимируем скроллинг | |
} | |
return false; // выключаем стандартное действие | |
}); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*====== Screen-Size ====== */ | |
@screen-iphone-max: 480px; | |
@screen-xs-max: 767px; | |
@screen-sm-min: 768px; | |
@screen-sm-max: 991px; | |
@screen-md-min: 992px; | |
@screen-md-max: 1199px; | |
@screen-lg-min: 1200px; | |
/*========= Media ========= */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script type="text/javascript" language="javascript"> | |
function call() { | |
var msg = $('#formx').serialize(); | |
$.ajax({ | |
type: 'POST', | |
url: 'res.php', | |
data: msg, | |
success: function(data) { | |
$('#results').html(data); | |
}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function wpbootstrap_scripts_with_jquery() | |
{ | |
// Register the script like this for a theme: | |
// Регистрирум скрипт ('ИМЯ СКРИПТА','ПУТЬ К ФАЙЛУ СКРИПТА', ЗАВИСИТ ЛИ ОТ БИБЛИОТЕК ); | |
wp_register_script( 'bootstrap', get_template_directory_uri() . '/vendor/bootstrap/js/bootstrap.min.js', array( 'jquery' ) ); | |
wp_register_script( 'easing', 'https://cdnjs.cloudflare.com/ajax/libs/jquery-easing/1.3/jquery.easing.min.js'); | |
wp_register_script( 'custom', get_template_directory_uri() . '/js/freelancer.min.js', array( 'jquery' ) ); | |
// For either a plugin or a theme, you can then enqueue the script: | |
// Добавляем наши скрипты "в очередь", в ковычках имя зарегистрированного скрипта(см.выше) |
OlderNewer