Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How To Write a JavaScript Event?
#2
Hi Shane,

Add a parameter "event" to your function OnWindowScroll() and use event.target to obtain the element which triggered the event. So you should have:

function OnWindowScroll(event) {
var theObject = event.target;
...
}

Please let me know if it does what you want.

Kind regards
Reply


Messages In This Thread
How To Write a JavaScript Event? - by ShaneStump - 11-11-2018, 09:31 PM
RE: How To Write a JavaScript Event? - by Alexandre Machado - 11-14-2018, 08:40 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)