IE does not select the form field, when the label is pressed, the form field is hidden

I use jQuery to hide form fields (I manipulate checkboxes and radio buttons).

In FF and Chrome, when I click the appropriate label, the form field is still activated and validated. In IE, this does not happen.

How can I set checkbox / radio shortcuts in IE?

+3
source share
3 answers

I also experienced it. You might be better off moving hidden fields off the screen rather than hiding them.

Actually, I asked this question on SO:

IE - hidden switch is not checked when you click on the corresponding label

+3
source

? , - css:

.hidden { position:relative; left: -10000 }

.hidden, / .

0

. IE . . , - onclick , . - :

$("label.hideablefield").live('click', function(){
  var fid = $(this).attr('for');
  $('#'+ fid).show();
  $('#'+ fid).select(); //or maybe .focus, I'm not sure 
});

, . / .

0

Source: https://habr.com/ru/post/1732040/


All Articles