An open API service indexing awesome lists of open source software.

https://github.com/emilymclean/wikicite

Easy Wikipedia style citations using jQuery
https://github.com/emilymclean/wikicite

citation javascript jquery

Last synced: 10 days ago
JSON representation

Easy Wikipedia style citations using jQuery

Awesome Lists containing this project

README

        

# WikiCite
Only requires jQuery!

Easy Wikipedia style citations using jQuery. Demo at https://bushfi.re or https://arctro.com/open/WikiCite

![example](https://i.imgur.com/ilSNTdd.png)

## Usage
To use WikiCite, first create either an inline or linked citation.
### Inline
``` html

Content that the citation is attached to.

```
### Linked
``` js

var linkedCitations = [
new Citation("identifier", "Citation text")
];

```
...
``` html

Content that the citation is attached to.

```

Once you have input citations, you can then call:
``` js
$("body").cite(linkedCitations, [configuration, callback]);
```
to automatically create citation markers.

You can also add a general reference box by creating a container with the id "complete-citation-container", like such:
``` html


```

## Configuration
WikiCite can be configured by an optional configuration object
``` js
CitationConfiguration(
enableCompleteCitationContainer = true, // Enable the general reference box
completeCitationContainer = "#complete-citation-container", // Set the id of the general reference box container
completeCitationContainerTitle = "

References

", // Set the title of the general reference box
enableHoverContainer = true, // Enable the hover reference box
hoverArrowOffset = 30, // Where the center of the hover arrow is
hoverContainerFadeLength = 50) // How long the hover box fade should take
```

## Future
* I plan on adding structured citations with formatting
* I also plan on adding little "link to use" markers to the general reference box