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
javascript:(function () { | |
var body = document.querySelector("body"); | |
var range = document.createRange(); | |
var text = document.createElement("P"); | |
var title = document.querySelector("title"); | |
if (title) { | |
text.innerHTML = title.textContent; | |
body.appendChild(text); | |
range.selectNode(text); | |
window.getSelection().addRange(range); |
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
javascript:(function () { | |
var body = document.querySelector("body"); | |
var range = document.createRange(); | |
var text = document.createElement("P"); | |
var description = document.querySelector('meta[name="description"]'); | |
if (description) { | |
text.innerHTML = description.content; | |
body.appendChild(text); | |
range.selectNode(text); | |
window.getSelection().addRange(range); |
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
jQuery(document).ready(function(){ | |
jQuery("#scroll-up").hide(); | |
jQuery(function () { | |
jQuery(window).scroll(function () { | |
if (jQuery(this).scrollTop() > 1000) { | |
jQuery('#scroll-up').fadeIn(); | |
} else { | |
jQuery('#scroll-up').fadeOut(); | |
} | |
}); |
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
<link id="favicon" rel="icon" href="путь/до/картинки1.jpg" type="image/x-icon" data="путь/до/картинки2.jpg" /> | |
function faviconPulse (time){ | |
var favicon = jQuery("#favicon"), | |
href = favicon.attr('href'); | |
if (favicon.attr('data')) { | |
var inter = setInterval(function(){ | |
if (favicon.attr('href') == href) { | |
favicon.attr('href', favicon.attr('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
//*************Обрезаем по символьно**************************************// | |
public static function limitChars($str, $limit = 100, $endChar = NULL, $preserveWords = FALSE) | |
{ | |
$endChar = ($endChar === NULL) ? '…' : $endChar; | |
$limit = (int) $limit; | |
if (trim($str) === '' OR strlen($str) <= $limit) | |
return $str; |
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> | |
var scripts = new Array('путь/до/файла.js'); | |
var css = new Array('путь/до/styles.css'); | |
function downloadJSAtOnload() { | |
var element; | |
for(var i = 0; i < scripts.length; i++){ | |
element = document.createElement("script"); | |
element.src = scripts[i]; | |
element.type = 'text/javascript'; |
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
jQuery(document).ready(function () { | |
//код jQuery | |
//функция вызова таймера | |
function get_timer() { | |
//Дата для обратного отсчета | |
var date_new = new Date(2015,3,12); | |
//Объект даты для обратного отсчета |
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
::-webkit-scrollbar { | |
height: 12px; | |
width: 12px; | |
background: #969696; | |
-webkit-border-radius: 1ex; | |
} | |
::-webkit-scrollbar-thumb { | |
background: #2B2B2B; | |
-webkit-border-radius: 1ex; |
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
//CSS | |
.loader { | |
background: none repeat scroll 0 0 #ffffff; | |
bottom: 0; | |
height: 100%; | |
left: 0; | |
position: fixed; | |
right: 0; | |
top: 0; | |
width: 100%; |