EasyUI Forum
September 13, 2025, 02:03:22 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: can't get textbox object in numberbox  (Read 8308 times)
Opan Mustopah
Full Member
***
Posts: 164


Indonesia


View Profile Email
« on: January 23, 2015, 04:30:21 AM »

hello all,

just simple question, why i can't get the textbox object in numberbox plugin with textbox method?

here is my code:
Code:
$('#length1').numberbox('textbox').bind('blur',function(e){
      console.log(this);
    });

and here errors message on firebug console:

Code:
TypeError: $.data(...) is undefined


return $.data(jq[0],"textbox").textbox.find(".textbox-text");

what i want is to binding numberbox element to blur event using jquery method.
can you tell me where is wrong from my code?

many thanks for the answer
Logged

-- Bajak Otak --
*** Sorry for my bad english :3 ***
--JeasyUI version 1.4--
stworthy
Administrator
Hero Member
*****
Posts: 3581


View Profile Email
« Reply #1 on: January 23, 2015, 09:10:54 AM »

If you have not created the numberbox component, please create it before calling any methods.
Code:
$('#length1').numberbox().numberbox('textbox').bind('blur',function(e){
      console.log(this);
});
Logged
Opan Mustopah
Full Member
***
Posts: 164


Indonesia


View Profile Email
« Reply #2 on: January 23, 2015, 07:51:21 PM »

thanks stworthy,
but why i must recreate numberbox again? instead length1 is already a numberbox component?
i create numberbox component using html
« Last Edit: January 23, 2015, 10:38:29 PM by Opan Mustopah » Logged

-- Bajak Otak --
*** Sorry for my bad english :3 ***
--JeasyUI version 1.4--
stworthy
Administrator
Hero Member
*****
Posts: 3581


View Profile Email
« Reply #3 on: January 24, 2015, 01:00:59 AM »

Once you have created the numberbox component, you do not need to recreate it again.
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!