The biggest problem with just writing some actual JS is a poor compatibility; when you try to generalise some one-liner working in a cutting edge browser you usually end up with a small library, plus the process is pretty painful. Thus those libraries' value mainly lies in research and testing required to make them work rather than in their core function.