How to get a DOM node, jQuery node or selector pointing to an element?

I want to use the function._get_type (node) from jsTree plugin types. The documentation states

Get type node. (mixed node) This can be a DOM node, jQuery node, or a selector pointing to an element.

I do not know what to serve node. I use the hotkeys plugin and on input click to display the type of this node.

I hope this is the corresponding html code where the rel="testsuite"node type is indicated.

<li class="jstree-closed" runurl="&lt;a class='non-html' href=&quot;http://10.0.0.50:4567/run2?run=login&amp;group=basics&quot;&gt;run&lt;/a&gt;" rel="testsuite" run="&lt;button class=&quot;square_button button_background&quot; type=&quot;button&quot; onclick=&quot;run_through_ajax('login','basics')&quot; &gt; run &lt;/button&gt;">

Do you have a tutorial to help me understand everything I need to find out my own questions like this in the future? Please note that I cannot read the jsTree source code to answer my question.

+3
source share
1 answer

I do not know what to serve node.

This means that you can transfer any of ...

  • document.getElementById('abc')
  • $('#abc')
  • #abc

This means that it probably carries the argument with $(), i.e. it will automatically support all three.

+2
source

All Articles