identify which I click in table with ajax source

identify which I click in table with ajax source

alanwkkalanwkk Posts: 2Questions: 2Answers: 0

Hello everybody

just join datatables family , and I face some problem about ajax data with jquery,
I have a table with ajax , draw data from php , under server side some row output <span class="status_on">ON</span> , look like a button, and I want to make jquery ...click on "ON" then server side will change ON to OFF...

I read some post in forum and write the script below:

$(document).ready(function() {
$('#user_list').dataTable();
$('#user_list').on('click', '.status_on' ,function () {

but I can't identify on which "status on" button is clicked , I try index(), but it fail

please help me ,thx

This discussion has been closed.