On Fri, Oct 10, 2008 at 16:21, Espen Moe-Nilssen <[EMAIL PROTECTED]> wrote: > For example, I made a product out of: > http://plone.org/documentation/tutorial/create-a-2d-image-sorter-based-on-folder_contents-sorting-functionality > .... now I know there is an javascript error console: > I get > node.parentNode is unidefined > on > ________________________________ > dndSlideSorter.getPos = function(node) { > var children = node.parentNode.childNodes; > var pos = 0; > for (var i=0; i<children.length; i++) { > if (node == children[i]) > return pos; > if (hasClassName(children[i], "sortable-cell")) > pos++; > } > return null; > }
Without looking at the rest of the code, I suspect the node object in the above code is a jQuery-wrapped node. Use jQuery traversal methods to get to the children instead, or make sure node is not jQuery-wrapped (call .get(0) on it). -- Martijn Pieters _______________________________________________ Product-Developers mailing list [email protected] http://lists.plone.org/mailman/listinfo/product-developers
