Good afternoon. Arose a question.
Write the animation to a button with the following logic:
if the mouse cursor is at the top of the screen,then call the function to display the button,if the lower part,then call a function to hide this button(screenshot below).
However, the function is called only once ,when you reload the page and does not switch States . That is, if I reload the page and the cursor was at this point in the lower part,the button is automatically invisible if at the top,you'll see.
How do you implement the ability to toggle the status without reloading the page?
A screenshot of the plugin call:
(TK need to call it so,and not using a selector)
In a console you call a function ,that is, log fires,however, change the properties does not occur. Can't understand what the problem is.
The button's default width is 0
(A property background is added solely to check the work)