Organizational Research By

Surprising Reserch Topic

how to get a dom element from a jquery selector


how to get a dom element from a jquery selector  using -'javascript,jquery,dom'

I'm having an impossibly hard time finding out to get the actual DOMElement from a jquery selector.  Sample Code:

<input type="checkbox" id="bob" />
  var checkbox = $("#bob").click(function() { //some code  } )


and in another piece of code I'm trying to determine the checked value of the checkbox.

  if ( checkbox.eq(0).SomeMethodToGetARealDomElement().checked )
    //do something.


And please, I do not want to do:

  if ( checkbox.eq(0).is(":checked"))
    //do something


That get's me around the checkbox, but other times I've needed the real DOMElement.
    
asked Sep 22, 2015 by santosh soni
0 votes
25 views



Related Hot Questions



Government Jobs Opening


...