I don't know JS well enough to understand the difference, other that one uses jQuery and the other is plain JS.