Blockquotes | JavaScriptSource

Blockquotes

Dunstan Orchard Feb 23, 2007

General

Use this script to dynamically place a citation link after any blockquotes on a page. Use it as many times on a page as necessary.


No cite or title

Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Nullam erat sapien, sollicitudin et, eleifend eget, aliquam ut, nunc. Integer iaculis tempor velit.

With title

Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Nullam erat sapien, sollicitudin et, eleifend eget, aliquam ut, nunc. Integer iaculis tempor velit.

With cite

Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Nullam erat sapien, sollicitudin et, eleifend eget, aliquam ut, nunc. Integer iaculis tempor velit.

With cite and title

Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Nullam erat sapien, sollicitudin et, eleifend eget, aliquam ut, nunc. Integer iaculis tempor velit.

Notes

  • If the cite element contains a URL, print '? Quote source' below the quote as a clickable link.
  • If the cite element contains only plain text, print '? [the text]' below the quote.
  • If the cite element is empty or absent then print nothing below the quote.

Source Code

Paste this source code into the designated areas.

External file

Paste this code into an external JavaScript file named: blockQuotes.js


CSS

Paste this code into your external CSS file or in the <style> section within the HEAD section of your HTML document.


Head

Paste this code into the HEAD section of your HTML document.


Body

Paste this code into the BODY section of your HTML document


Leave a Response

(0 comments)