5
私はjQueryの1.3.2を使用していますが、私は、最新バージョンに更新している:以下はjqueryのの最新バージョンでは動作しません
- 何がここで間違っているのですか?
var input = $(this);
// get the associated label using the input's id
var label = $('label[for=' + input.attr('id') + ']');
//get type, for classname suffix
var inputType = (input.is('[type=checkbox]')) ? 'checkbox' : 'radio';
// wrap the input + label in a div
$('<div class="custom-' + inputType + '"></div>').insertBefore(input).append(input, label);
// find all inputs in this set using the shared name attribute
var allInputs = $('input[name=' + input.attr('name') + ']');
おかげで、それは:) – user1177860
マークの答えを働いた後、受け入れ:) –
ありがとうとして!あなたは私にいくつかの時間を救った。バージョン1.8.0から二重引用符が必要になりました... – nightcoder