You can create your own ajax function and then trigger it with data-ajax, like:
Code:
<a href="#" data-ajax="toggle_enable">
Code:
phpbb.addAjaxCallback('toggle_enable', function(res) { 'use strict'; var $this = $(this), newHref = $this.attr('href'); $this.text(res.text); $this.attr('title', res.title); if (newHref.indexOf('disable') !== -1) { newHref = newHref.replace('disable', 'enable'); } else { newHref = newHref.replace('enable', 'disable'); } $this.attr('href', newHref);});
Statistics: Posted by MattF — Tue May 13, 2025 12:24 am