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

164
Views
Remove title from select2

I am using select2. I need to remove title of selected values. My code is like below.

<li class="select2-selection__choice" title="C Volunteer" data-select2-id="select2-data-16-lf0b"></li>

Source code is like below.

enter image description here

Output is like below.

enter image description here

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

0

Here's a minimal solution for your use case:

$("#select2-data-16-lf0b").removeAttr("title")
about 4 years ago · Juan Pablo Isaza Report

0

You can select the elements by their class and remove its attribute this way.

$('.select2-selection__choice').removeAttr('title')

hope have helped you.

about 4 years ago · Juan Pablo Isaza Report

0

A simple solution to select the selected options. This will work at any action either its selection or unselection.

$("yourselector").on("select2:select select2:unselect", function (e) {
    $(this).removeAttr("title");       
});

This may help you

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!