Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

140
Views
Cómo habilitar/deshabilitar BsMultiSelect

Estoy tratando de usar BsMultiSelect .

¿Cómo puedo habilitar/deshabilitar manualmente un menú de selección?

Pude deshabilitar con éxito el menú así

 // remove all options removeOptions(select); // disable the select element select.setAttribute('disabled', true); // update the data since all options were removed select.updateData(); // update the appearance of the menu since it is now disabled select.updateAppearance();

Luego traté de habilitarlo así, lo que no funcionó.

 // add new options to the select element addOptions(select); // enable the select element select.removeAttribute('disabled'); // update the data since new options were added select.updateData(); // update the appearance of the menu since it is now enabled select.updateAppearance();
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Un poco tarde, pero tuve un problema idéntico y lo resolví con la opción integrada getDisabled de bsMultiSelect, que requiere verdadero o falso.

Luego usé $('#yourMultiSelectOption').attr('custom-data-attr', false/true).bsMultiSelect("UpdateDisabled") para cambiar primero el atributo a la opción deseada y luego desencadenar manualmente una actualización de bsMultiSelect .

 $(#yourMultiSelectOption).bsMultiSelect({ getDisabled: function () { return $("#yourMultiSelectOption").attr('custom-data-attr') === 'true'; }, [other options...] })

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!