Suppose you want your website to behave consistently in the latest three versions of the four most popular browsers. You have two choices: 1) try to do it yourself, 2) use a Javascript library.
Option 1 has the following drawbacks: a) you'll need to set up an environment in which to test 12 different browsers, b) you'll need a few years to learn the nuances, annoyances, and bugs in 12 different examples of badly written software.
Option 2 has the following drawbacks: a) you'll need to know where to find the library documentation, b) you'll need a few days to learn how to use the library.
The likely outcome of option 1 is that you will eventually get your site to behave consistently in the two or three browsers you have tested. The likely outcome of option 2 is that you will spend your time working on interesting things.