0.9.0 • Published 10 years ago

jquery-remote v0.9.0

Weekly downloads
-
License
MIT
Repository
-
Last release
10 years ago

jQuery.remote

Eases the remote handling of links

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

Heres(https://github.com/mjacobus/jQuery.remote/issues) is the issue tracker.

Contributing

Please refer to the contribuiting guide.

Lincense

MIT

Authors