angularjs - how to fit button to jquery-ui slider -


i want add function jquery-ui slider. when click space of slider, want trigger function. when click space of slider, set nearest handler. added button slider. when add new handler, add new button on top of slider. problem how set width , left of button make clickable. jsfiddle here:

http://jsfiddle.net/5ycu91hj/

the picture here:

slider button

what want implement click different space between handlers can trigger different functions.

<button style="left:10% width: 20%;height:inherit;position:absolute"></button> 

i'm not sure whether there're better solution this. checked jquery-ui api didn't see click function can use.

not sure you're asking, here's attempted answer:

to call function on click, can use onclick() event.

<button style="left:10% width:20%; height:inherit; position:absolute"      onclick="myfunction()"></button> 

then can pass arguments function position of mouse, value(s) of sliders (see "value"), , simple math figure out "space" you're in.

edit: didn't notice using angular - make easier! can use ng-click="myfunction() , possibly use two-way data-binding, depending on want in function.


Comments

Popular posts from this blog

Fail to load namespace Spring Security http://www.springframework.org/security/tags -

sql - MySQL query optimization using coalesce -

unity3d - Unity local avoidance in user created world -