G
G
Ganjubas_Original2017-12-26 15:52:35
WordPress
Ganjubas_Original, 2017-12-26 15:52:35

Why does jq stop properly counting scrollTop when setting overflow-x hidden on Body?

Hello. Such a thing. The site has a horizontal scroll in the mobile version, which is unacceptable. When you try to set overflow-x hidden for body, the scroll disappears, but the JQ plugin stops working. As it turned out, after setting this css property, jq ceases to correctly calculate scrollTop. For any scroll, the indicator is 0. That's why the plugin does not work. Why is this and what to do about it?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
O
Orkhan Hasanli, 2019-10-18
@mk3mk

Hello!
1) I strongly recommend that you study the hierarchy of VI templates.
2) For the main page, you need not index.php, but front-page.php (for a static page), and for a dynamic one (your last posts) - blog.php. index.php "takes a hit" when the required templates are not available.
3) functions.php & style.css leave by itself
4)

And if you have to add materials later?

Depending on what you mean by materials. If these are records, then of course you need the single.php & archive.php template. You can also add category.php
If by materials you mean pages, then you need the page.php template Actually, if you need an individual template for the page, then you can call the templates page-ID.php
In general, look at the template hierarchy and all the questions yourself eliminate themselves

M
maxsnw, 2017-12-26
@maxsnw

why hide the horizontal scroll? if you have it, but it is not provided, then you need to look for a jamb in the layout and see which element climbs and makes this scroll. Can help overflow in auto value.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question