first commit
This commit is contained in:
27
templates/instytut_dendrologii_/js/mod51.js
Normal file
27
templates/instytut_dendrologii_/js/mod51.js
Normal file
@@ -0,0 +1,27 @@
|
||||
window.addEventListener('load', () => {
|
||||
wyrownaj1();
|
||||
})
|
||||
window.addEventListener('resize', () => {
|
||||
wyrownaj1();
|
||||
})
|
||||
|
||||
function wyrownaj1() {
|
||||
|
||||
|
||||
if(screen.width<1925)
|
||||
{
|
||||
console.log(screen.width);
|
||||
var react1= document.querySelector('.ainsta img').getBoundingClientRect();
|
||||
var react2= document.querySelector('.container-menu ul li a').getBoundingClientRect();
|
||||
var react3= document.querySelector('.facos').getBoundingClientRect();
|
||||
var szer=document.querySelector('.container-menu').offsetWidth;
|
||||
document.querySelector('.ajajka').style.setProperty('left',(react1.right-25)+'px','important');
|
||||
document.querySelector('.ajajka').style.setProperty('top',react2.y+'px','important');
|
||||
var react4= document.querySelector('.ajajka').getBoundingClientRect().x;
|
||||
var prawa=screen.width-react3.left;
|
||||
|
||||
document.querySelector('.container-menu').style.setProperty('left',(react3.left-szer)+'px');
|
||||
|
||||
}else {
|
||||
document.querySelector('.container-menu').removeAttribute('style');
|
||||
}}
|
||||
Reference in New Issue
Block a user