so the symphony orchestra is not music in comparison with a guitar solo and blowjob is not sex compared with coition, right?
in russian there exist the rude widly used word (a curse) which has many meanings depending on the context it is used. so, if you say 'i have [Present Perfect Simple of that word] with that code' everybody will understand how hard the work was )) the word is mostly equal to the english 'f*ck' ))))
You're taking the argument out of context.
.ready() is another function (prototype) that replaces the onload event.
var depth = $(this).parents("div[class='subsections']").length;
Sorry but unless you know what came before, having a framework will not be a substitute for programming.
How many rails programmers understand the underlying code that it uses? Same goes for all these frameworks, unless you know the underlying methods, a framework programmer will be lost if they are faced with swathes of script that they have no idea what it does.
As for var depth = $(this).parents("div[class='subsections']").length; is not about putting things in one line, its about construction code to do jobs that are needed and only when needed on that particular page. With a framework you have the problem of adding weight to a page when you find that the majority of that code in the framework is not needed but is loaded.
What may be a cost benefit to the programmer using the tool is not to the web browser / user loading it.
that argument about frameworks adding weight to page load used to have some substance, but the latest minified version of jQuery comes in at 91kb... just a little over twice the size of the image file for that ad over on the right there, and not really the sort of load that even an older gen smartphone would notice...