Non-jQuery initialisation examples

Non-jQuery initialisation examples

kthorngrenkthorngren Posts: 20,331Questions: 26Answers: 4,774

The Non-jQuery initialisation examples aren't shown as an option from the examples page.

Kevin

Replies

  • allanallan Posts: 61,744Questions: 1Answers: 10,111 Site admin

    Hi Kevin,

    As all examples now have jQuery and vanilla initialisation code, those examples are actually redundant. I removed them from my source files, so they don't get updated or included when the site is deployed any more, but equally I don't tend to delete old files. I'll look at putting a note on those ones to say they are out of date.

    Allan

  • kthorngrenkthorngren Posts: 20,331Questions: 26Answers: 4,774

    Thats what I thought but I was looking for this Javascript DOM events example but didn't see it. I made sure to select the Vanilla JS option. Maybe its just this specific example thats missing.

    Kevin

  • allanallan Posts: 61,744Questions: 1Answers: 10,111 Site admin

    Yes, that example does quite have a 1:1 replacement, but this example does the same thing, and without any "visible" jQuery code. Rather it uses the DataTables on() method for the event handler, which more or less just proxies jQuery's. It is much easier to follow than the other example I think.

    Allan

  • kthorngrenkthorngren Posts: 20,331Questions: 26Answers: 4,774

    Wow, I guess I need glasses :smile: I didn't notice the slight difference between the jQuery and Vanilla JS versions.

    Kevin

Sign In or Register to comment.