How to get a DOM node, jQuery node or selector pointing to the element?
I want to use ._get_type ( node ) function from jsTree plugin types The documentation says
Get the type of a node. (mixed node) This can be a DOM node, jQuery node or selector pointing to the element.
I do not know what to supply as a node
. I use hotkeys plugin and on enter press I want to display the type of that node.
I hope this is the relevant html code where rel="testsuite"
specifies the node type.
<li class="jstree-closed" runurl="<a class='non-html' href="http://10.0.0.50:4567/run2?run=login&group=basics">run</a>" rel="testsuite" run="<button class="square_button开发者_运维技巧 button_background" type="button" onclick="run_through_ajax('login','basics')" > run </button>">
Is there any tutorial that can help me to understand anything I need to know my own questions like that in the future? Note that I cannot read jsTree source code in order to answer my question.
I do not know what to supply as a
node
.
It means you can pass any of...
document.getElementById('abc')
$('#abc')
#abc
It means it probably wraps the argument with $()
, meaning it will automatically support all three.
精彩评论