--proxy
browser-sync start --proxy mylocal.dev
[BS] Proxying: http://local.dev.domain
[BS] Access URLs:
------------------------------------
Local: http://localhost:3002
External: http://192.168.1.6:3002
------------------------------------
UI: http://localhost:3003
UI External: http://192.168.1.6:3003
------------------------------------
http://192.168.1.6:3002
, вбиваете его на телефоне и смотрите (естественно телефон должен быть подключен к той же сети, куда подключен и ПК).const config = {
env: {
HOST: process.env.HOST || '',
}
}
export default config;
const parent = document.querySelector('.box').parentNode;
const iMin = 2;
const iMax = 5;
const wrapper = document.createElement('div');
wrapper.classList.add('wrapper');
if (parent.children[iMin]) {
const elems = Array.prototype.slice.call(parent.children, iMin, iMax);
elems[0].before(wrapper);
wrapper.append(...elems);
}
// или
const elems = parent.querySelectorAll(`:nth-child(n + ${-~iMin}):not(:nth-child(n + ${-~iMax}))`);
if (elems.length) {
parent.insertBefore(wrapper, elems[0]);
elems.forEach(n => wrapper.appendChild(n));
}
// или
if (parent.children.length > iMin) {
parent.children[iMin].insertAdjacentElement('beforebegin', wrapper);
for (let i = iMax - iMin, n = null; i-- && (n = wrapper.nextElementSibling);) {
wrapper.insertAdjacentElement('beforeend', n);
}
}
$(function(){
$('.your-class').slick({
slidesToShow: 4,
slidesToScroll: 1,
appendArrows: $('.your-class-arrow'),
prevArrow: '<button id="prev" type="button" class="btn btn-juliet"><i class="fa fa-chevron-left" aria-hidden="true"></i> Туда</button>',
nextArrow: '<button id="next" type="button" class="btn btn-juliet">Сюда <i class="fa fa-chevron-right" aria-hidden="true"></i></button>'
});
});
<div class="your-class">
<div>your content</div>
<div>your content</div>
<div>your content</div>
</div>
<div class="your-class-arrow"></div>
var changeTitle = function() {
this.title = function () {
var title = document.title;
document.title = (title == "hello" ? "" : "hello");
}
};
changeTitle.prototype.start = function() {
this.timer = setInterval(this.title, 1000);
};
changeTitle.prototype.stop = function() {
clearInterval(this.timer)
};
var timerTitle = new changeTitle();
window.onblur = function() {
timerTitle.start();
};
window.onfocus = function() {
timerTitle.stop();
};