[Solved] get value of an item using jquery


var text = $.trim($('#divInTimeStamp-5-2')[0].firstChild.nodeValue);

Demo

  • [0] gets a reference to the DOM element #divInTimeStamp-5-2. It is a shorthand for .get(0).
  • .firstChild gets its first child text node.
  • .nodeValue contains the text node’s content.
  • $.trim for cross-browser white space trimming.

solved get value of an item using jquery