Парковка элементов относительно друг друга через точки
Point: 1|2|3|4
topLeft topRight
1___2
| |
|___|
4 3
bottomLeft bottomRight
Edges 1
_____
| |
4 | | 2
|_____|
3
Point format:
[targetPoint, itemPoint]
Docking variants:
[1,3] [2,4]
__ __
item -> |_3|______|4_|
target -> |1 2|
__|4____3|__
|_2| |1_|
[4,2] [3,1]
__
|4_|___ __
__|1 2|1_|
|_3|4____3|
|_2|
__
__ ___|_3|
|_2|1 2|__
|4____3|4_|
|1_|
1_________2
|1_| |_2|
|__ __|
|4_|___|_3|
4 3
python -m venv venv
python -V
sudo rm /usr/lib/python3.11/EXTERNALLY-MANAGED
function watcher() {
gulp.watch('./src/style.css', { delay: 500 }, styles);
}
// в данном случае будет задержка в полсекунды после сохранения файла.
console.log(t.current, 0)
console.log(JSON.parse(JSON.stringify(t, 0)))
Array.from(el.classList).forEach(n => el.classList.toggle(n, !!n.indexOf('modal--')));
el.classList.remove(...[...el.classList].filter(n => n.startsWith('modal--')));
for (let i = el.classList.length; i--; ) {
if (el.classList[i].search('modal--') === 0) {
el.classList.remove(el.classList[i]);
}
}
el.className = el.className.split(' ').filter(n => !/^modal--/.test(n)).join(' ');
el.className = el.className.replace(/(^| )modal--\S*/g, '').trim();
$('#test', '<div class="b"><div id="test"></div></div>').length;
$('.b', '<div class="b"><div id="test"></div></div>').length;
doc = new DOMParser().parseFromString('<div class="b"><div id="test"></div></div>', 'text/html');
$('.b', doc).length;
$(document).on('click', 'a', function(){
$.ajax({
url: $(this).attr('href'),
dataType: 'html',
success: function(data) {
console.log($(data)); //Тут выводиться ниже в скрине
console.log($('<div>'+data+'</div>').find('#pagination')); // Должно найти
}
});
return false;
});
$(document).on('click', 'a', function(){
$.ajax({
url: $(this).attr('href'),
dataType: 'html',
success: function(data) {
console.log($(data)); //Тут выводиться ниже в скрине
console.log($(data).filter('#pagination')); // Должно найти
}
});
return false;
});