Skip to content
This repository has been archived by the owner on Feb 25, 2018. It is now read-only.
/ jquery-loadinline Public archive

have links and forms load their content inline via ajax

Notifications You must be signed in to change notification settings

rfk/jquery-loadinline

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Status: Unmaintained

No Maintenance Intended

I am no longer actively maintaining this project.

jquery.loadInline: have links and forms load content inline via ajax

This jQuery plugin causes links to display their contents within an element on the current page, using a simple AJAX request. Similarly, it modifies forms to submit themselves via ajax and display the resulting content inline in the current page (using the fantastic jquery.form plugin for all the heavy lifting).

The interesting part is that any links or forms within the returned content are automatically decorated to load their content into the same inline element. The overall effect is like a little mini browser window contained inline in the current page.

Use it like so:

$("a.load-inline").loadInline();

An options object may be given as the only argument to loadInline(), to specify any of the following properties:

target:  selector for the inline element into which contents
         will be loaded.

create:  function that will be called if no target is specified;
         it must find/create and the inline element to be used
         and then return it.

template:  HTML node that will be cloned by the default 'create'
           function to produce the inline element.

success:  callback executed whenever content is successfully loaded

error:  callback executed whenever content loading gives an error

setState:  callback executed whenever the state of the inline element
           changes.  The state name is given as the only argument,
           and can be one of 'wait', 'success' or 'error'.

finish:  callback executed when content is successfully loaded but
         contains no further links or forms; basically indicates that
         no further navigation can be performed within the element.

The default behavior is to create a fresh

for each loadInline() element and display it as a pop-up. When no further navigation is possible, or when ESC is pressed, the pop-up is automatically closed.

About

have links and forms load their content inline via ajax

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published