Skip to content

Fixed length for variable string #2

@captncarrot

Description

@captncarrot

treeTable allows user defined child prefixes but uses the fixed length of 9 from the default:

   function parentOf(node) {
     var classNames = node[0].className.split(' ');
-    
+
     for(key in classNames) {
       if(classNames[key].match(options.childPrefix)) {
-        return $("#" + classNames[key].substring(9));
+        return $("#" + classNames[key].substring(options.childPrefix.length));
       }
     }
   };

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions