In Editor how can I make certain columns non-editable

In Editor how can I make certain columns non-editable

cranworthcranworth Posts: 20Questions: 10Answers: 0
edited August 2014 in Editor

I am using the Editor plugin. I have enabled in-line editing using the code below. One of my columns contains URL links. How can I make these columns non-editable, and thus the URL link clickable?

$('#directory_entries').on( 'click', 'tbody td:not(:first-child)', function (e) {
        editor.inline( this, {
            submitOnBlur: true
        } );
        
      } );

Since it's the fifth column I want to disable in-line edit, I tried this:

$('#directory_entries').on( 'click', 'tbody td:not(:first-child, :fifth-child)', function (e) { 
... 
}

But it makes all columns now non-editable.

Answers

  • cranworthcranworth Posts: 20Questions: 10Answers: 0
    edited August 2014

    Anyone looking for the solution it should be:

    $('#directory_entries').on( 'click', 'tbody td:not(:first-child, :nth-child(5))', function (e) {
    ...
    }
    

    Here is api entry for the nth-child selector in jquery: http://api.jquery.com/nth-child-selector/

This discussion has been closed.