Download
User Rating: 0/5 ( 0 votes)
jQuery jAplus is an unobtrusive script that adds useful features to 'A' tags allowing webpages to maintain compatibility with HTML standards. The script syntax is compatible with all HTML / XHTML standards.
For example, you can create a link that opens a new window (like the target attribute) without invalidating the HTML code!
<a href="index.htm" class="blank">Click Me</a>
Is JavaScript disabled? No problem, the links will continue to work in the traditional way!
This plugin requires jQuery 1.5.0 and above to work.
Tested on Internet Explorer 6/7/8, Firefox, Safari, Opera, and Chrome.
Source: japlus.simplit.it
1. INCLUDE JS FILES
<script src="js/jquery-1.7.2.min.js" type="text/javascript" charset="utf-8"></script>
<script src="js/jquery.Aplus.js"></script>
2. HTML
<a href="demo/ok13.htm" class="aplus-blank" id="link1">Use prefix</a>
3. JAVASCRIPT
//enable A+ syntax for the specific A tag
$('#link1').Aplus({confirmType:'dialog'});
4. HTML SYNTAX
class : attribute
-
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.
-
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
-
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.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 : nt, The top position of the window (default 0)