so far so good. but i wanted to button to not display until a certain threshold is hit. So started tweaking w/the code below. which is not working. Any suggestions?
thx
D
If you mean the ‘e’ at the end here: ‘scroll’,function(e) then that is the event object which you can find out details about the event that just happened. You aren’t using it in your routine so it can be removed. It’s often used so that you can say ‘e.preventDefault’ to stop the default behavior of that event.
@James_Hibbard or Paul can explain this in much better detail than me.
Commonly event-based functions have the (e) or (evt) included with the function even if it’s not explicitly used. This helps to inform the person reading the code that the function is triggered at some stage in response to an event.
it’s handy to know this because the this keyword then refers to the element that triggered the event, and other information can be obtained from the event when (not if) somebody has to debug an issue.