EmKayDK / jstepper

A jQuery plugin usable for making a numeric textfield value easy to increase or decrease
ISC License
18 stars 6 forks source link

onStep is not working at all #26

Closed srghma closed 6 years ago

srghma commented 6 years ago

try paste code below in stript field here http://jstepper.emkay.dk/ and test it

$('#txtTesting').jStepper({minValue:0, maxValue:23, minLength:2, onStep: testfunction});

function testfunction(objTextField, bDirection, bLimitReached) {

  if (bDirection) {
    // Was increased
  } else {
    // Was decreased
  }
  if (bLimitReached) {
    // A limit was reached
  } else {
    // A limit was not reached
  }

  alert(objTextField.val());

}
EmKayDK commented 6 years ago

I have just tried it and it works fine.

Have you pressed the "Apply" button after inserting the script? What behaviour are you seeing? Is there an error in the console?

srghma commented 6 years ago

@EmKayDK fk, I got it, its only working when using up and down keys, sorry, I was entering values by hand and was waiting for something to happen.