The current URL loading the Google Maps JavaScript API has not been added to the list of allowed referrers. Please check the referrer settings of your API key on the Google API Console
var e = ... // берем элемент
var childs = e.childNodes,
count = childs.length;
var i = 0;
while(i < count) {
if (
(childs[i].nodeType == 8) // тип 8 - это как раз комментарий
&&(/more/.test(childs[i].nodeValue)) // а здесь проверяем наличие слова more внутри комментария
) {
var container = document.createElement('div');
container.innerHTML = '<div class="'+childs[i].nodeValue+'"></div>';
childs[i].parentNode.replaceChild(container.firstChild, childs[i]);
}
i++;
} var $block = $('nav'),
var position = $block.offset().top;
$(window).on('resize', function() {
position = $block.offset().top
});
$(window).scroll(function(){
if ($(window).scrollTop() > position) {
$block.addClass('fixed');
} else {
$block.removeClass('fixed');
}
});<nav></nav><div.nav-wrapper> <nav></nav> </div>font-size: 12px;8px * 100vw / 1920px = 0.42vwfont-size: calc(12px + 0.42vw);@function vw($pixel, $defaultWidth: 1920px) {
@return $pixel * (100 / $defaultWidth) * 1vw;
}
@function calcVw($minPixel, $pixel) {
$addPixel: vw($pixel - $minPixel);
@return #{"calc(#{$minPixel} + #{$addPixel})"};
}
@mixin fontSizeAdaptive($minPixel, $pixel) {
font-size: $minPixel;
font-size: calcVw($minPixel, $pixel);
}.selector {
@include fontSizeAdaptive(12px, 20px);
} или лучше весь код писать с нуля, только руками и в простом блокноте?
где всего этого не будет
стоит ли использовать сразу фреймворки, библиотеки
var grid = $("#grid");
var table = $('<table>'), tr, td;
grid.append(table);
for (var height = 0; height < 16; height++) {
tr = $('<tr>');
for (var width = 0; width < 10; width++) {
tr.append('<td></td>');
}
table.append(tr);
}function myFunc() {
// some code
}
$(function(){
myFunc();
setInterval(myFunc, 15000);
});