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

249
Views
Sortable, prevent Duplicate Items, not working

I have list of items :

<ul class="list 32" data-id="1"><li class="item" data-id="1">1</li><li class="item" data-id="1">2</li></ul>

and this js code with sortable

$(".drop").sortable({
            receive: function (e, ui) {
                var identicalItemCount  = $(".list."+id+"").children('li:contains(???)').length;
          
                console.log(ui.item.text())
                if (identicalItemCount > 1) {
                  console.log("this) } else { console.log("this)});

My goal is to archive is this: If the data-id exist, it shouldn't be droppable?

about 4 years ago · Juan Pablo Isaza
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!