如何使用:
function() {
$(document).on({
mouseenter: function () {
var $currentNode = $(this);
var cssPathForThisNode = $currentNode.getPath();
$('#resultDiv').html(cssPathForThisNode);
},
mouseleave: function () {
$('#resultDiv').html('鼠标悬停以下任意元素,即可显示获取的路径数据');
}
}, '.pathfinder');
}
