1
0
mirror of https://github.com/e107inc/e107.git synced 2025-07-31 20:00:37 +02:00

Prevent e-ajax from firing multiple times.

This commit is contained in:
Cameron
2021-10-14 08:58:05 -07:00
parent d6b0391a2d
commit cbb8315417

View File

@@ -123,12 +123,12 @@ var e107 = e107 || {'settings': {}, 'behaviors': {}};
e107.behaviors.eAJAX = {
attach: function (context, settings)
{
$(context).find('.e-ajax').one('e-ajax').each(function ()
$(context).find('.e-ajax').each(function ()
{
var $this = $(this);
var event = $this.attr('data-event') || e107.callbacks.getDefaultEventHandler($this);
$this.on(event, function ()
$this.one(event, function ()
{
var $element = $(this);
@@ -219,7 +219,7 @@ var e107 = e107 || {'settings': {}, 'behaviors': {}};
$(this).show();
// default 'toggle'.
$(this).click(function ()
$(this).on('click', function ()
{
var $this = $(this);