Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

AngularJS Slider Range change event only when pointer release

Tags:

angularjs

I am using Angular slider https://github.com/PopSugar/angular-slider for min and max range selection. I used the change method provided in the slider directive. The problem I am facing is its calling the JS function myChange() from the point I start sliding the pointer. So my function is getting called unnecessarily . I want to call the function only when I release the pointer in the slider bar.

Used code : <slider floor="1000" ceiling="100000" ng-model-low=minPackagePrice ng-model-high="maxPackagePrice" change="myChange()"></slider>

like image 477
Arabinda Avatar asked Jul 04 '26 07:07

Arabinda


1 Answers

Try:

<slider floor="1000" ceiling="100000" ng-model-low=minPackagePrice ng-model-high="maxPackagePrice" ng-mouseup="myChange()"></slider>
like image 164
Mike Feltman Avatar answered Jul 06 '26 13:07

Mike Feltman



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!