2 * DO NOT EDIT THIS FILE.
3 * See the following change record for more information,
4 * https://www.drupal.org/node/2815083
8 (function ($, window, Drupal) {
9 Drupal.behaviors.insertTest = {
10 attach: function attach(context) {
11 $('.ajax-insert').once('ajax-insert').on('click', function (event) {
12 event.preventDefault();
14 url: event.currentTarget.getAttribute('href'),
15 wrapper: 'ajax-target',
18 method: event.currentTarget.getAttribute('data-method'),
19 effect: event.currentTarget.getAttribute('data-effect')
21 var myAjaxObject = Drupal.ajax(ajaxSettings);
22 myAjaxObject.execute();
25 $('.ajax-insert-inline').once('ajax-insert').on('click', function (event) {
26 event.preventDefault();
28 url: event.currentTarget.getAttribute('href'),
29 wrapper: 'ajax-target-inline',
32 method: event.currentTarget.getAttribute('data-method'),
33 effect: event.currentTarget.getAttribute('data-effect')
35 var myAjaxObject = Drupal.ajax(ajaxSettings);
36 myAjaxObject.execute();
39 $(context).addClass('processed');
42 })(jQuery, window, Drupal);