-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
  • 19,729
  • 13
  • 73
  • 118
santa
  • 12,234
  • 49
  • 155
  • 255

1 Answers1

0

Use parseInt(... ) mate.

var a = parseInt("10")

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

codebased
  • 6,945
  • 9
  • 50
  • 84