EasyUI Forum
May 09, 2024, 03:34:36 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: slider + exclude value  (Read 1962 times)
rezzonico
Full Member
***
Posts: 183


View Profile
« on: January 24, 2022, 01:33:32 AM »

Hi all,

my slider is defined as follow:
min: 1,
max: 4,
step: 1

The values displayed are: 1,2,3,4

I need to exclude "3" and display:
1,2,4

Is it possible ?

Thanks
Miche
Logged
jarry
Administrator
Hero Member
*****
Posts: 2262


View Profile Email
« Reply #1 on: January 24, 2022, 07:24:26 PM »

Listen to the 'onChange' event, if the value equals to 3 then set it to another value. Please try this code.
Code:
$('#s1').slider({
onChange: function(value){
if (value==3){
$(this).slider('setValue', 4);
}
}
})
Logged
rezzonico
Full Member
***
Posts: 183


View Profile
« Reply #2 on: January 28, 2022, 04:33:41 AM »

Thanks !

Regards
Miche
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!