Skip to content

mjacobus/jQuery.remote

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

jQuery.remote

A nice simple way to handle ajax requests

Code information:

Build Status Coverage Status Code Climate

Package information:

Dependency Status

Usage

Basic usage:

$('a[data-remote]').remote();

Customizing:

$('a[data-remote]').remote({
  success: function (response) {
    // handle response
    this.getTarget().append('<p>Response:</p>').append(response);
  }
});

Options

Most options can be passed in the form of an object when instantiating the plugin or in the data-{opition} format:

  • target - The place the response should be prepended/appended/placed. See targetMethod
  • targetMethod - html | prepend | append
  • type - The type of request: IE: 'POST', 'GET'
  • data - The data to be send in the request

Valid options:

$('a').remote({
  data: { foo: 'bar' }
});

$('a').data('foo', 'bar').remote({
  data: function () {
    var foo = this.$element.data('foo');

    return { foo: value };
  }
});

Installing

@TODO

Issues/Features proposals

Here is the issue tracker.

Contributing

Please refer to the contribuiting guide.

Lincense

MIT

Authors

About

A nice simple way to handle ajax requests

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published