-1

I am getting a numeric value from an element using

$('.myEm').text();

It returns a number from the element, but I need to increment the value by another value.How do I convert it to an integer?

simonzack
  • 17,855
  • 12
  • 65
  • 107
santa
  • 11,716
  • 43
  • 149
  • 239

1 Answers1

0

Use parseInt(... ) mate.

var a = parseInt("10")

http://www.w3schools.com/jsref/jsref_parseint.asp

codebased
  • 6,660
  • 8
  • 46
  • 82