background preloader

jQuery Impromptu

jQuery Impromptu
About jQuery Impromptu is an extension to help provide a more pleasant way to spontaneously prompt a user for input. More or less this is a great replacement for an alert, prompt, and confirm. Not only does it replace these but it also allows for creating forms within these controls. Options $.prompt( msg , options ) msg The message can either be an html string, or an object of "states". html A string of html or text for the content buttons focus Index of the button to focus(0,1,2..). submit A function to be called when the prompt is submitted. If a string is passed as the message in place of a state, buttons, focus, and submit will be substituted from the options below. options classes Add class names to the outer Impromptu shell (parent of the fade and prompt) Default: '' close A function to be called when the prompt is closed and just before being removed from the DOM. loaded A function to be called when the prompt is fully loaded Default: function(event){} opacity overlayspeed persistent prefix show

jquery.event.drag A jquery special event plugin that makes the task of adding complex drag interactions, to any element, simple and powerful. Overview The plugin works by using standard DOM events, and simulating custom events to create a drag interaction. This plugin is focused on correctly simulating the drag events in a very usable way. Events A basic drag interaction starts when a user presses down a mouse button with the cursor inside an element (mousedown), continues while the user moves the mouse (mousemove), and ends when the user releases the mouse button (mouseup). draginit This event is fired when a mouse button is pressed (mousedown) within the bound element. This plugin also supports "live" event delegation... sort of. Methods In the interest of maintaining consistency with the jQuery API, a helper method has been added as shorthand for binding and triggering "drag" event handlers. .drag() Triggers any bound "drag" event handlers for each element in the jQuery collection. Options Properties

CSS3 PIE: CSS3 decorations for IE Learn CSS Positioning in Ten Steps: position static relative absolute float 1. position:static The default positioning for all elements is position:static, which means the element is not positioned and occurs where it normally would in the document. Normally you wouldn't specify this unless you needed to override a positioning that had been previously set. 2. position:relative If you specify position:relative, then you can use top or bottom, and left or right to move the element relative to where it would normally occur in the document. Let's move div-1 down 20 pixels, and to the left 40 pixels: Notice the space where div-1 normally would have been if we had not moved it: now it is an empty space. It appears that position:relative is not very useful, but it will perform an important task later in this tutorial. 3. position:absolute When you specify position:absolute, the element is removed from the document and placed exactly where you tell it to go. Let's move div-1a to the top right of the page: What I really want is to position div-1a relative to div-1. Footnotes 10.

Related: