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

181
Views
La opción de borrar select2 no se muestra correctamente

Tengo un problema con mi complemento select2, la opción clara no se muestra correctamente

El css no ha sido modificado. Cuál podría ser el problema ?

ejemplo

el html

 <div class="form-group <?PHP if(form_error('moa')) echo 'has-error'; ?>"> <div class="row"> <label>Maitre d'ouvrage <span class="text-danger">*</span></label> <a href="<?=base_url('societe/ajouter?moa')?>" target="_blank"><p style="float:right;">Ajouter une société</p></a> </div> <select class="select-search-ajax" data-url="<?=base_url('societe/moa_json')?>" name="moa"> <?PHP foreach($societeMoa as $row) { if($chantier->moa==$row->id_contact) { ?> <option value="<?PHP echo $row->id_contact; ?>" selected="selected"><?PHP echo mb_strtoupper($row->nom_societe).' ('.$row->nom_contact.' '. $row->prenom_contact.')'; ?></option> <?PHP } } ?> </select> <?php echo form_error('moa','<span class="help-block">','</span>'); ?> </div>

J.S.:

 $(document).ready(function(){ $('.select-search-ajax').each(function(){ $(this).select2({ ajax: { url: $(this).attr("data-url"), dataType: 'json' }, placeholder: 'Selectionnez...', allowClear: true, }); }); });

CSS:

 .select2-selection--single .select2-selection__clear { position: relative; cursor: pointer; float: right; font-size: 0; line-height: 1; margin-top: 2px; margin-left: 5px; opacity: 0.75; filter: alpha(opacity=75); }

Como dije, no edité el css.

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Resolví mi problema eliminando algo de css, en esta clase .select2-selection__clear:after eliminé: content: '\ed6b'; font-family: 'icomoon';

Y en esta clase .select2-selection__clear: cambié font-size: 0; por font-size: 1em;

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!