Skip to content

Instantly share code, notes, and snippets.

$(document).ready(function() {
function heightDetect() {
$(".main_head").css("height", $(window).height());
};
heightDetect();
$(window).resize(function() {
heightDetect();
});
});
To allow shortcodes please open the bloom.php file and search for:
? stripslashes( html_entity_decode( $details['custom_html'], ENT_QUOTES, 'UTF-8' ) )
Replace it with:
? do_shortcode(stripslashes( html_entity_decode( $details['custom_html'], ENT_QUOTES, 'UTF-8' ) ))
<?php
if ($_GET['phone']) {
$id = 'XXXX';
$key = 'XXXXXXX';
$bytehandFrom = 'SMS-INFO';
$text = 'Заказ обратного звонка с номера: ' . $_GET['phone'];
$to = 'XXXXXXX';
$result = file_get_contents('http://bytehand.com:3800/send?id='.$id.'&key='.$key.'&to='.urlencode($to).'&from='.urlencode($bytehandFrom).'&text='.urlencode($text));
}
?>
<script>
// Переменные для Google Analytics
var _gaq = [['_setAccount', 'UA-XXXXXXX-X'], ['_trackPageview']];
// Переменная для указания языка для отображения виджетов Google+
window.___gcfg = {lang: 'ru'};
// Инициализация ВКонтакте
window.vkAsyncInit = function () {
VK.init({apiId: YOUR_ID, onlyWidgets: true});
HTML
<span class="sandwich">
<span class="sw-topper"></span>
<span class="sw-bottom"></span>
<span class="sw-footer"></span>
</span>
CSS-SASS
.toggle_mnu
width: 60px
height: 60px
$(document).ready(function() {
function heightDetect() {
$(".main_head").css("height", $(window).height());
};
heightDetect();
$(window).resize(function() {
heightDetect();
});
Html
<div class="loader">
<div class="loader_inner"></div>
</div>
Sass
.loader
background: none repeat scroll 0 0 #ffffff
bottom: 0
height: 100%
HTML:
<div class="wrapper">
<div class="tabs">
<span class="tab">Вкладка 1</span>
<span class="tab">Вкладка 2</span>
<span class="tab">Вкладка 3</span>
</div>
<div class="tab_content">
<div class="tab_item">Содержимое 1</div>
<div class="tab_item">Содержимое 2</div>
/*function to add async and defer attributes*/
function defer_js_async($tag){
## 1: list of scripts to defer.
$scripts_to_defer = array('script-name1.js', 'script-name2.js', 'script-name3.js');
## 2: list of scripts to async.
$scripts_to_async = array('script-name1.js', 'script-name2.js', 'script-name3.js');
#defer scripts
foreach($scripts_to_defer as $defer_script){