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
/*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){ |
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
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> |
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
Html | |
<div class="loader"> | |
<div class="loader_inner"></div> | |
</div> | |
Sass | |
.loader | |
background: none repeat scroll 0 0 #ffffff | |
bottom: 0 | |
height: 100% |
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() { | |
function heightDetect() { | |
$(".main_head").css("height", $(window).height()); | |
}; | |
heightDetect(); | |
$(window).resize(function() { | |
heightDetect(); | |
}); | |
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> | |
// Переменные для Google Analytics | |
var _gaq = [['_setAccount', 'UA-XXXXXXX-X'], ['_trackPageview']]; | |
// Переменная для указания языка для отображения виджетов Google+ | |
window.___gcfg = {lang: 'ru'}; | |
// Инициализация ВКонтакте | |
window.vkAsyncInit = function () { | |
VK.init({apiId: YOUR_ID, onlyWidgets: true}); |
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 | |
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)); | |
} | |
?> |
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
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' ) )) |
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() { | |
function heightDetect() { | |
$(".main_head").css("height", $(window).height()); | |
}; | |
heightDetect(); | |
$(window).resize(function() { | |
heightDetect(); | |
}); | |
}); |