Tag: dom-events

57 votes
13 answers
1.4K views
On - window.location.hash - Change?

I am using Ajax and hash for navigation. Is there a way to check if the window.location.hash changed like th

avatar
Dorian
0 1 0 9
asked 07 September, 2021
55 votes
17 answers
3K views
window.onload vs $(document).ready()

What are the differences between JavaScript's window.onload and jQuery's $(document).ready() method?

avatar
Tana
0 1 0 9
asked 07 September, 2021
51 votes
14 answers
2.7K views
event.preventDefault() vs. return false

When I want to prevent other event handlers from executing after a certain event is fired, I can use one of tw

avatar
Vi
0 1 0 9
asked 07 September, 2021