Comment AX Progressive enhancement

Story

Expandable Comments

Preview

Progressive enhancement (Score: 4, Interesting)

by tdk@pipedot.org on 2014-03-07 20:16 (#AX)

Thanks for doing this. It looks good, even better than soylentnews .
It's possible to automatically cope with javascript (JS) being off.
You have a link with an href that points to the comment on a page of its own. In JS you then set the onclick event to a function that returns false, and does your ajax stuff.
This tells the browser to not follow the link if the function runs. This then automagically does the right thing if JS is on or off.
You can also use the jQuery event.preventDefault() call.
This is what I do on squte and it's got good feedback so far.

Moderation

Time Reason Points Voter
2014-03-09 01:11 Insightful +1 abc@pipedot.org
2014-03-12 05:49 Interesting +1 ploling@pipedot.org
2014-03-07 22:14 Interesting +1 tdk@pipedot.org

Junk Status

Not marked as junk