EasyUI Forum
April 28, 2024, 02:53:04 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: How to hid textBox and combobox  (Read 21353 times)
zhaowenyi713
Newbie
*
Posts: 4


View Profile Email
« on: November 30, 2014, 07:24:20 PM »

How to hid textBox and combobox in IE11 .  $("#XX").hide(); $("#XX").css("display", "none"); does not work.
Logged
stworthy
Administrator
Hero Member
*****
Posts: 3581


View Profile Email
« Reply #1 on: December 01, 2014, 02:55:15 AM »

You can extend the 'show' and 'hide' methods easily.
Code:
$.extend($.fn.textbox.methods, {
show: function(jq){
return jq.each(function(){
$(this).next().show();
})
},
hide: function(jq){
return jq.each(function(){
$(this).next().hide();
})
}
})

Usage example:
Code:
$('#t1').textbox('hide');  // hide the textbox
$('#c1').combobox('hide');  // hide the combobox
Logged
zhaowenyi713
Newbie
*
Posts: 4


View Profile Email
« Reply #2 on: December 07, 2014, 07:53:56 PM »

You can extend the 'show' and 'hide' methods easily.
Code:
$.extend($.fn.textbox.methods, {
show: function(jq){
return jq.each(function(){
$(this).next().show();
})
},
hide: function(jq){
return jq.each(function(){
$(this).next().hide();
})
}
})

Usage example:
Code:
$('#t1').textbox('hide');  // hide the textbox
$('#c1').combobox('hide');  // hide the combobox

Thank you!
Logged
jega
Full Member
***
Posts: 190


View Profile
« Reply #3 on: June 08, 2021, 02:38:45 PM »

Hi. Trying this

$.extend($.fn.textbox.methods, {
   show: function(jq){
      return jq.each(function(){
         $(this).next().show();
      })
   },
   hide: function(jq){
      return jq.each(function(){
         $(this).next().hide();
      })
   }
})

It hide/show textbox, but not the label. How to do this also. And can it be built in a future update

Jesper
Logged
jega
Full Member
***
Posts: 190


View Profile
« Reply #4 on: December 13, 2021, 02:30:53 PM »

Hi stworthy

Still no solution to also hide/show the label Huh
Logged
stworthy
Administrator
Hero Member
*****
Posts: 3581


View Profile Email
« Reply #5 on: December 13, 2021, 07:49:07 PM »

These methods will be included in next version. They can be defined as below:
Code:
$.extend($.fn.textbox.methods, {
   show: function(jq){
      return jq.each(function(){
         $(this).next().show();
         $($(this).textbox('label')).show();
      })
   },
   hide: function(jq){
      return jq.each(function(){
         $(this).next().hide();
         $($(this).textbox('label')).hide();
      })
   }
})
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!