EasyUI Forum
April 20, 2024, 04:20:35 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Updating Sliders causes error during click  (Read 7283 times)
rickmus
Newbie
*
Posts: 8


View Profile Email
« on: January 21, 2017, 12:03:35 PM »

I need to update the slider's min/max as the area they represent is dynamic.  Normally if I do an update an the user isn't about to click the slider to start sliding, all is good.  But if you happen to do an update around the same time the user is pressing the button over the slider knob, you will get the errors below.  This is using 1.5.1 and prior version 1.4.x also exhibited the same error.

      $( "#map_vertical_scroll" ).slider( {
         min: 0,
         max: this.m_ScrollBounds.m_flBoundsHeight,
      } );

jquery.easyui.min.js:445 Uncaught TypeError: Cannot read property 'options' of undefined
    at _43 (jquery.easyui.min.js:445)
    at jquery.easyui.min.js:638
_43 @ jquery.easyui.min.js:445

(anonymous) @ jquery.easyui.min.js:638
jquery.easyui.min.js:389 Uncaught TypeError: Cannot read property 'options' of undefined
    at _39 (jquery.easyui.min.js:389)
    at HTMLDocument._49 (jquery.easyui.min.js:483)
    at HTMLDocument.dispatch (jquery.min.js:4)
    at HTMLDocument.r.handle (jquery.min.js:4)
Logged
stworthy
Administrator
Hero Member
*****
Posts: 3581


View Profile Email
« Reply #1 on: January 22, 2017, 12:28:24 AM »

If you only want to change the 'max' value, please call this code instead.
Code:
$('#ss').slider('options').max = 50;
$('#ss').slider('resize');
Logged
rickmus
Newbie
*
Posts: 8


View Profile Email
« Reply #2 on: January 30, 2017, 01:09:43 PM »

That worked, thank you!
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!