Navigation Menu

Skip to content

baldwindavid/jquery-autoIcons

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

jquery.autoIcons.js

The intent of this tiny plugin is to automatically add icons to links matching common extensions (pdf, doc, xls, etc.). You can also easily add your own custom mappings.

Requirements

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

Super Simple Example

sample js...

<script type="text/javascript" charset="utf-8">
  $(function(){
    $("#main-content").autoIcons();
  });
</script>

...and sample html

<div id="main-content">
  <a href="somefile.doc">Link to Some Word doc</a>
</div>

Demo

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

Icon Set

Any icon set can be made to work with this plugin, but the examples in the demo are from the Doctype Icons 2 set

jquery.icon.js icon micro-framework

You might also find the jquery.icon.js icon micro-framework plugin helpful.

About

Automatically add icons to links based on common extensions (doc, xls, etc.)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published