Код: Выделить всё
$(document).on("click", ".iconsTop .iconst", function (e) {
var idfilter = $(this).attr("id");;
$.ajax({
type: "POST",
dataType: "text",
url: "filter",
data: { filter_id:idfilter },
cache: false,
success: function (data) {
$('.maincontact').empty().append(data);
}
});
});
Код: Выделить всё
class App_home extends BaseController
{
public function filter()
{
echo 'ok';
}
}
Код: Выделить всё
use CodeIgniter\Router\RouteCollection;
$routes->setAutoRoute(true);
$routes->get('filter', 'App_home::filter');
jquery-3.7. 1.min.js:2 POST http://localhost/app/public/filter 404
(Не найден)
404 Контроллер или его метод не найден: Фильтр: :index
Подробнее здесь: https://stackoverflow.com/questions/785 ... -404-error
Мобильная версия