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
.cf:before, | |
.cf:after { | |
content: " "; | |
display: table; | |
} | |
.cf:after { | |
clear: both; | |
} |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Box Shadow</title> | |
<style> | |
.box { | |
height: 150px; | |
width: 300px; | |
margin: 20px; |
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
Drupal.behaviors.listWords = { | |
attach: function () { | |
$.fn.paintFirstWord= function(color) { | |
var str = this.text(); | |
var splited = str.split(' '); | |
var replaced = str.split(splited[0]).join('<span style = "color:' + color + ';font-weight:bold">' + splited[0] + '</span>'); | |
this.html(replaced); | |
}; | |
$('.pane-fpid-136 li').each( function() { |
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 $link = $('ul.header-nav li:first-child a'); | |
$link.on('click', function(e) { | |
e.preventDefault(); | |
$('html, body').animate({ scrollTop: $('#about').offset().top }, 1000); | |
console.log($('#about').offset().top); | |
}); |
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
$('.view-commonly-asked-questions .views-row').click(function (){ | |
$(this).find('.field-name-field-answer').slideToggle(); | |
$(this).find('.views-field-name').toggleClass('active-tab'); | |
$(this).siblings().find('.field-name-field-answer').slideUp('slow'); | |
$(this).siblings().find('.views-field-name').removeClass('active-tab'); | |
}); |
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
//hiding scrollbar | |
html { | |
overflow: scroll; | |
overflow-x: hidden; | |
} | |
::-webkit-scrollbar { | |
width: 0; | |
background: transparent; | |
} |
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 addNewElem() { | |
// //adding banner element to the top of the page | |
// var div = document.createElement('div'); | |
// div.className = "sale-banner--mobile"; | |
// div.innerHTML = "BOOK NOW TO GET YOUR FIRST PICK UP FREE"; | |
// var createdDiv = document.querySelectorAll('.sale-banner--mobile'); | |
// | |
// if (window.matchMedia("(max-width: 685px)").matches && createdDiv.length <= 0) { | |
// document.body.insertBefore(div, document.body.firstChild); | |
// } |
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
if (window.localStorage) { | |
var elements = document.querySelectorAll('[name]'); | |
for (var i = 0, length = elements.length; i < length; i++) { | |
(function(element) { | |
var name = element.getAttribute('name'); | |
element.value = localStorage.getItem(name) || ''; | |
element.onkeyup = function() { |
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
1.чтобы сделать всю статью кликабельной(ссылка) и при этом чтобы она имела другие вложенные ссылки - используем тег <object> | |
ex. HTML: | |
<a href="#1"> Some main text | |
<object><a href="#2">Nested link</a></object> | |
continuation of the main text</a> | |
Browser parser reads it as: | |
<a href="#1">Some main text</a> | |
<a href="#2">Nested link</a> | |
<a href="#1">continuation of the main text</a> |
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(){ | |
$.ajax({ | |
url: "lines.txt", // path to file | |
dataType: 'text', // type of file (text, json, xml, etc) | |
success: function(data) { // callback for successful completion | |
$("#sentences").html(data); | |
}, | |
error: function() { // callback if there's an error | |
alert("error"); |
OlderNewer