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

189
Views
Bootstrap 5 Popover texto dinámico

Estoy intentando y no puedo configurar el texto en un popover de arranque:

HTML

 <span class="d-inline-block" id="searchPredict" tabindex="0" data-bs-toggle="popover" data-bs-trigger="hover focus" title="Search" data-bs-placement="bottom" data-bs-content="initial text"> <input type="text" id="searchBar" class="form-control mr-sm-2" placeholder="Product search" aria-label="Product search" aria-describedby="basic-addon2" id="floatingInput2" name="searched"> </span>

JS

 $(document).ready(function(){ $("#searchBar").click(function(){ $("#searchPredict").popover({ title: "testing123" }); }); });

¿Alguna idea de dónde me estoy equivocando? Gracias por adelantado.

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

0

Agregando $('#searchPredict').attr('data-bs-original-title', "testing123"); después de su función popover.

 $(document).ready(function(){ $("#searchBar").click(function(){ $("#searchPredict").popover(); //Bootstrap below 5 // $('#searchPredict').attr('data-original-title', "testing123"); //Bootstrap 5+ $('#searchPredict').attr('data-bs-original-title', "testing123"); }); });
 <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script> <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/js/bootstrap.bundle.min.js"></script> <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/css/bootstrap.min.css" rel="stylesheet"/> <span class="d-inline-block" id="searchPredict" tabindex="0" data-bs-toggle="popover" data-bs-trigger="hover focus" data-bs-placement="bottom" data-bs-content="initial text"> <input type="text" id="searchBar" class="form-control mr-sm-2" placeholder="Product search" aria-label="Product search" aria-describedby="basic-addon2" name="searched"> </span>

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!