Skip to content

Adds CSS classes to links found within the element specified by the selector based on a predetermined set of characteristics.

Notifications You must be signed in to change notification settings

craigmccoy/jquery-linkcues

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 

Repository files navigation

jquery.linkcues.js is a jQuery plugin that adds CSS classes to links found within the element specified by the selector based on a predetermined set of characteristics.

  • link directs the user to a different domain
  • link directs the user user to a secure (https) page
  • link directs the user user to an ftp site
  • link is an email shortcut (mailto)
  • link directs the user to a downloadable file (pdf, mp3, etc)
  • link opens in a new window (configurable)

Live Demonstration

Click here to view a live demo.

Quick Documentation

$(selector).linkcues(options);

options: A set of key/value pairs that configure settings for the plugin. All options are optional.

  • filetypes: (type: String, default: "pdf") A comma-separated list of file extensions to scan links for.
  • classPrefix: (type: String, default: "linkcues-") This string is prefixed to all classes used by the plugin.
  • windowTarget: (type: String, default: "_blank") This determines what the new window target will be.

Usage Example

$('p').linkcues({
	filetypes : 'pdf,mp3,doc',
	windowTarget : '_new'
});

About

Adds CSS classes to links found within the element specified by the selector based on a predetermined set of characteristics.

Resources

Stars

Watchers

Forks

Packages

No packages published