I 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.
In case you want to know how I did it, just the following simple codes:
<input type="button" value="Load all articles" id="preview">
$(this).parent().load(this.href + " h1, div > div> p");
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
Anyway, skip this part if you are not technical type of person.
What would you like? The expanded view (with the contents) or the original view?