1つ前のノードを取得する
function getPreviousNode (node) { var n; if (n = node.previousSibling) { while (n.hasChildNodes()) n = n.lastChild; return n; } return node.parentNode; }
function getPreviousNode (node) { var n; if (n = node.previousSibling) { while (n.hasChildNodes()) n = n.lastChild; return n; } return node.parentNode; }