Вопрос о select2. Старая строка становится обычным HTML и больше не становится select2. ⇐ Jquery
Вопрос о select2. Старая строка становится обычным HTML и больше не становится select2.
I want to create a new row when clicking a button and that row should have 2 select2, for some reason when initializing select2, the new row becomes select2 but the old row becomes regular HTML. Does anyone know how to fix this?
{{ __('tm_absenteeism_data_entry_by_employee_no.label_check_if_activated') }} {{ __('tm_absenteeism_data_entry_by_employee_no.label_group_company') }} {{ __('tm_absenteeism_data_entry_by_employee_no.label_department') }} {{ __('tm_absenteeism_data_entry_by_employee_no.label_location') }} {{ __('tm_absenteeism_data_entry_by_employee_no.label_working_unit') }} {{ __('tm_absenteeism_data_entry_by_employee_no.label_employee_type') }} {{ __('tm_absenteeism_data_entry_by_employee_no.label_kelas_cabang') }} {{ __('tm_absenteeism_data_entry_by_employee_no.label_segmen') }} {{ __('tm_absenteeism_data_entry_by_employee_no.label_position') }} {{ __('tm_absenteeism_data_entry_by_employee_no.label_klasifikasi_jabatan') }} {{ __('tm_absenteeism_data_entry_by_employee_no.btn_add') }} Cancel {{ __('tm_absenteeism_data_entry_by_employee_no.btn_apply') }} $('#btn_add_filter').click(function() { var newRow = '' + '' + '' + '' + 'Group Company' + 'Department' + 'Location' + 'Working Unit' + 'Employee Type' + 'Kelas Cabang' + 'Segmen' + 'Position' + 'Klasifikasi Jabatan' + '' + '' + '' + '' + '' + '' + '' + ''; $('.modal-body .row:last').after(newRow); $('.modal-body .row:last .advance_label').select2({ placeholder: "Select Filter" }); $('.modal-body .row:last .advance_filter').select2({ placeholder: "Select Filter" }); }); as you can see, i want to create a new row when i clicked a button, but the old row becomes regular HTML. can someone please tell me why and how to fix it? Thanks in advance
Источник: https://stackoverflow.com/questions/781 ... -becomes-s
I want to create a new row when clicking a button and that row should have 2 select2, for some reason when initializing select2, the new row becomes select2 but the old row becomes regular HTML. Does anyone know how to fix this?
{{ __('tm_absenteeism_data_entry_by_employee_no.label_check_if_activated') }} {{ __('tm_absenteeism_data_entry_by_employee_no.label_group_company') }} {{ __('tm_absenteeism_data_entry_by_employee_no.label_department') }} {{ __('tm_absenteeism_data_entry_by_employee_no.label_location') }} {{ __('tm_absenteeism_data_entry_by_employee_no.label_working_unit') }} {{ __('tm_absenteeism_data_entry_by_employee_no.label_employee_type') }} {{ __('tm_absenteeism_data_entry_by_employee_no.label_kelas_cabang') }} {{ __('tm_absenteeism_data_entry_by_employee_no.label_segmen') }} {{ __('tm_absenteeism_data_entry_by_employee_no.label_position') }} {{ __('tm_absenteeism_data_entry_by_employee_no.label_klasifikasi_jabatan') }} {{ __('tm_absenteeism_data_entry_by_employee_no.btn_add') }} Cancel {{ __('tm_absenteeism_data_entry_by_employee_no.btn_apply') }} $('#btn_add_filter').click(function() { var newRow = '' + '' + '' + '' + 'Group Company' + 'Department' + 'Location' + 'Working Unit' + 'Employee Type' + 'Kelas Cabang' + 'Segmen' + 'Position' + 'Klasifikasi Jabatan' + '' + '' + '' + '' + '' + '' + '' + ''; $('.modal-body .row:last').after(newRow); $('.modal-body .row:last .advance_label').select2({ placeholder: "Select Filter" }); $('.modal-body .row:last .advance_filter').select2({ placeholder: "Select Filter" }); }); as you can see, i want to create a new row when i clicked a button, but the old row becomes regular HTML. can someone please tell me why and how to fix it? Thanks in advance
Источник: https://stackoverflow.com/questions/781 ... -becomes-s
-
- Похожие темы
- Ответы
- Просмотры
- Последнее сообщение
-
-
Возникли проблемы при работе с экземплярами Select2 Select2 в WooCommerce.
Anonymous » » в форуме Jquery - 0 Ответы
- 43 Просмотры
-
Последнее сообщение Anonymous
-