I improved the answer and created a blog post about it here.
I followed this post in order to add the jQuery accordion functionality to the Quick Launch in SharePoint.
While the code in the above link applies to SharePoint 2007, I somewhat managed to change it so that it should now work with SharePoint 2013.
Here's the code that I currently have:
Currently the above code can hide all the navigation links under each heading in the Quick Launch upon load, but the problem I have is: when you click on a certain heading, it does not show the corresponding navigation links. It just follows the url behind that heading and goes to that subsite. And when it is on the subsite, it should normally show all the navigation links underneath that subsite as well, but this doesn't work either.
You may see some alerts in comment here and there, I just added those to see which part of the code gets executed when I test it out.
I would really appreciate it if someone would take a look at this, I'm sure I'm just looking over something small, I just can't figure out what.
Steps to reproduce:
1) Copy the above code and paste it in a new file named "accordion.js"
2) Add a reference to this file in your master page (see code below for my reference)
3) Change the body tag on the master page (see code below)
4) Test it out on a site that uses that master page
Thanks for your time!