Is it possible to attach a bubble editor to a element by using a class?
Is it possible to attach a bubble editor to a element by using a class?
I've constructed an app in DataTables/Editor that works well, which now needs a feature that allows a certain class of user to see (and edit) a particular data field. I've assigned a class to the <td> that contains this data, and I hide the column for the users who don't need to see it, while showing it for those who should see (and edit) it. All of that works fine.
Now, I've tried to enable bubble editing for this column (which has the class="rPriority", as follows:
$("#tickets").on('click','tbody tr td.rPriority', function(e) {
editor.bubble(this);
} );
The <td> elements do correctly have the class="rPriority". I am wondering if the row selection is taking precedence over the class selector so that the bubble editor never gets invoked. I have another app where I would like to provide bubble editing for only a few of the columns, for which I would again tend to use a class selector.
Is it possible to attach bubble editing to <td>'s with a class selector in this way?
Thanks,
Tom
This question has an accepted answers - jump to answer
Answers
I've answered my own question:
The class selector works. The problem is that the variable I needed to attach the bubble editor to is not called 'editor'. When I fixed that, it worked. I had not coreectly understood the example for first several times I read it.
I'm sorry I bothered anyone with this question.
Thanks to those who read it anyway,
Tom