jQuery A+

Include script after the jQuery library:
<script src="/path/to/jquery.Aplus.js"></script>
Usage:
jQuery A+ accepts settings from an object of key/value pairs, and can be assigned to any HTML element. See "Plugin options".
//enable A+ syntax for all A tags inside body element, now or in the future
$('body').Aplus();

//enable A+ syntax for the specific A tag
$('#link1').Aplus({confirmType:'dialog'});
            

HTML syntax

class attribute

ajax
Replaces the contents of the page with the contents of the url using ajax
ajax-to-element_id
Replaces only the contents of the element, with the contents of the url, using ajax
ajax-from-element_id
Replaces the contents, with a part of the contents of the url (the element content indicated)
blank
Opens the linked document in a new window or tab
confirm
Opens the linked document only after user confirmation
confirm-mask-element_id
Element that contains text for the confirm dialog.
dialog
Open link in a jqueryUI dialog (use iframe)
dialog-ajax
Fetch url via Ajax and insert contents in the dialog body
dialog-full
Same size of the page
dialog-modal
Dialog will have modal behavior
dialog-w-value
Dialog width (in pixels or percentage)
dialog-h-value
Dialog height (in pixels or percentage)
dialog-l-value
The left position of the dialog (in pixels)
dialog-t-value
The top position of the dialog (in pixels)
dialog-option-value
Support all jqueryUI dialog options. See jQueryUI dialog demos »
disabled
The link is disabled. No rules is performed
frame
Opens the linked document in a named frame
frame-framename
Name of the frame where the link is open
notify
Invoke url using a Ajax GET request and display the server response
notify-life
Life time (in seconds) of the notification (default: 10)
notify-type
Specifies the type of notification to have appeared (values: empty,growlUI,jGrowl - default:empty)
parent
Opens the linked document in the parent frame
print
Prints the contents of the current window
scroll
Create an anchor animated scroll (anchor links only)
scroll-speed-value
Set animated scroll speed
scroll-offsetY-value
Add offset value (in px) to the final scroll position
self
Opens the linked document in the same frame as it was clicked
win
Opens the linked document in a new window popup
win-center
Center window in the page
win-fullpage
Same size of the page
win-fullscreen
Same size of the display
win-width-value
Window width (in pixels or percentage)
win-height-value
Window height (in pixels or percentage)
win-left-value
The left position of the window (in pixels)
win-top-value
The top position of the window (in pixels)
win-scrollbars
Show the window scrollbars
win-toolbar
Show the window toolbar

title attribute

message
Text of the confirmation dialog or ID of the element (start with #)

Mask tags

[href]
Replaced with content of the href attribute
[text]
Replaced with content of the tag
[title]
Replaced with content of title attribute

Custom events

See the demo page for more details on the events
ajaxComplete.aplus
This event occurs when the ajax request is completed. Param: response (response content)
ajaxToComplete.aplus
This event occurs when the ajax request is completed and the content is appended to HTML element. Param: obj (HTML element)
ajaxError.aplus
This event occurs when the ajax request fails. Param: textStatus, errorThrown
ajaxMismatch.aplus
This event occurs when the ajax request is completed and the response does not contain the expected content. Param: response (response content)

Plugin options

ajax.loadMsg
Message shown when ajax call (default: <img src="loader.gif" />)
confirm
string, Default confirm message
confirmType
dialog = override confirm box with JqueryUI dialog, inline function = override confirm box with custom function, (default empty)
dialog
(default empty object) Is same "Options" object of JQueryUI Dialog Widget see JQueryUI API
disabledMsg
false = don't show the alert message in disabled link even if title attribute is present (default 'alert')
notify.life
Life time (in seconds) of the notification (default: 10)
notify.type
empty = alert notification, growlUI (blockUI plugin required),jGrowl (jGrowl plugin required). Default: empty
prefix
Use prefix to prevent conflicts between class names (default empty)
scroll.speed
int, Number determining how long the animation will run (default 300)
scroll.offsetY
int, Value to be added to the Y coordinate of the final position (default 0)
win.check
boolean, Adds the class "DISABLED" to the link, during the loading of the window, to prevent multiple clicks on the link. (default true)
win.width
int, Window width (default 400)
win.height
int, Window height (default 400)
win.scrollbars
enum, 1=Show scrollbars, 0=Hide scrolllbars (default 0)
win.toolbar
enum, 1=Show browser toolbar, 0=Hide toolbar (default 0)
win.left
int, The left position of the window (default 0)
win.top
int, The top position of the window (default 0)
Fork me on Github