Load All Articles on Category Page
By Jian Shuo Wang on 2009-10-03 11:06 · BackstageI added a little function for myself - not necessarily everyone will love it. My last discussion about Full Content on Home Page of my Blog actually turned out to a conclusion that my readers love its current design (or to better put it, hate change). So I will try not to change stuff too much.
On the category page, I used to have a list of all the articles in the category, with a link to the original article, and excerpt. It is nice for people to read that article, and the comments(!).
From time to time, I want to review all the articles without going into each link - I never succeeded in clicking every link on the page to read every article.
So… I think of workaround - a way to add that function without change the old layout.
The New Button
Now, visit any of the category page, like this one, you will see a big button “Load all articles”. Clicking the articles, you will see all the articles loaded on the same page for you to quickly review. Reload the page restore it to the original view.
The Code
In case you want to know how I did it, just the following simple codes:
….
It is a very simple JQuery code. It basically tells the browsers when a button named “preview” is called, for each a tag under li tag, load the HTML specified by the href attribute into the parent node. Then only gets the p tag under two div tag…
Anyway, skip this part if you are not technical type of person.
Your Comments
What would you like? The expanded view (with the contents) or the original view?
2 Comments
That said, I don't remember seeing *any* of those original posts about bookstores. They were very interesting, especially the amazing drawing lesson you provided about parallel lines!!
I may not be a "geek" (definitely not!) but I am endlessly fascinated by the things I can learn from reading some of your more technical posts, Jian Shuo. Thanks for expanding my world :-)