Sunday, January 12, 2014

// // Leave a Comment

Make a jump break jump to where you want to

Jump breaks are great, but the jump target is not always what you want: exactly at the place where <!--more--> was. Maybe you'd like to show the whole post instead. Here is a simple tip to alter the target position. You have to use the html editing mode for these hacks to work.

Somewhere in post before the <!--more-->

Just put <a name="more"></a> where you want the jump target (before <!--more-->). It can be at the start of the post text, for example.

Start of post including title

Maybe you want to go higher than start of the post text. Put this at the start of the post, this one includes post title, too (and this post is a demonstration of this variation):

<a style="position:absolute;top:-4em;" name="more"></a>

Start of page

<a style="position:absolute;top:-99em;" name="more"></a>

Just play around with these a while, and I think you'll get the drift.

Strictly speaking, adding another #more target to the page produces invalid html: there's duplicate anchor name in page and html validators will complain about that. But it works: browsers just use the first anchor they find, no complaints. :) 


Post a Comment

Confused? Don't hesitate to ask We love to hear your feedbacks and suggestions. We will try our best to reply to your queries as soon as time allows.

Note: Please do not spam. Those type of comments will be deleted upon our review.