Cursor Plugin
The Cursor plugin is used to display a small icon beside the system mouse cursor to indicate the status or activity of an element when the mouse is moved over it.
Syntax:
$("…").cursor("busy")
$("…").cursor("hide")
$("…").cursor("custom-cursor")
To include the Cusror Plugin inside a web page use: html.include("rich/cusror")
cursor("hide") or cursor("default")
This removes the cursor from view when the mouse is moved over the selected element.
cursor("busy")
Display the busy cursor for the element. If the html.rich.cursor.hourglass property is not set, then the plugin use the busy_cursor class to determine the type of image to display. This makes it possible to apply a theme to the busy cursor. If this class is not available, then the default hourglass will be displayed.
cursor("custom")
This displays a gif image from the rich/cursors folder.
To use a custom cursor, copy the gif image into the rich/cursors folder and then pass the name of the image (without the .gif extension) to the Cursor plugin:
html.ready(function(){
// displays an animated search cursor icon
$("#webform").cursor("search");
});
If the image file you would like to display is not within the rich/cursors folder, you can pass the url and name of the image to the plugin as shown below:
html.ready(function(){
// displays cursor icon
$("#webform").cursor("/images/hourglass.png");
});
Subscribe to Feed by Email