Skip to content

marvink/ajaxwrapper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 

Repository files navigation

ajaxwrapper

AjaxWrapper is a jquery module for simple standardized usage of ajax in a website. It is using a iframe fallback for file uploads.

Demo

http://www.marvinkerkhoff.de/ajaxwrapper/examples/index.html

Usage

  1. Include the AjaxWrapper source file
  2. Add the event handler for submit and click methods. It is not necessary which class you use for the event handling. But you should use the on method to get everything work fine.s
  3. Add class="ajax" to the a-tags or form-tags
  4. Use jquery selectors in the target attributes for a-tags or form-tags. The target should be an existing div with the id or class.
  5. That's it.
$(document).ready(function() { 
    $('body').on("click", "a.ajax", function() {
        return $(this).ajaxwrapper();
    });

$('body').on("submit", "form.ajax", function() {
        return $(this).ajaxwrapper();
    });
});

About

Ajax Wrapper is a jquery module for simple standardized usage of ajax in a website.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages