Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Icon micro-framework
JavaScript
branch: gh-pages

This branch is 13 commits behind baldwindavid:gh-pages

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
demo
.gitignore
README.markdown
icon.css
index.html
jquery.icon.js

README.markdown

jquery.icon.js

The intent of this tiny plugin is to easily and flexibly add icons beside your text, links, list items, etc. It is sort of a micro-framework for icons on your website.

Requirements

  • jquery
  • jquery.icon.js
  • icon.css (or your custom css)

Super Simple Example

sample js...

<script type="text/javascript" charset="utf-8">
  $(function(){
    $(".example-class").icon();
  });
</script>

...and sample html

<a class="example-class" rel="facebook.gif">Link to Facebook</a>

Demo

The repo includes the demo files, but you can also view the demo at http://baldwindavid.github.com/jquery-icon/demo

Icon Sets

jquery.autoIcons.js

You might also find the jquery.autoIcons.js plugin helpful to automatically add icons to links based upon common file extensions (doc, xls, etc) or your own custom extensions.

Something went wrong with that request. Please try again.