Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6189977
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T02:30:22+00:00 2026-05-24T02:30:22+00:00

Im trying to create a page in which users can search for items on

  • 0

Im trying to create a page in which users can search for items on the left side of the page, and drag and drop the items they want onto the right, kind of like a shopping cart.

I have been using

 $(function() {
 $(".result").draggable({
    helper: function(event, ui) {
    return $(this).clone().children("img");
    }
    });

    $("#rightcol").droppable({
        accept: ".result",
        drop: function(event,ui){
        $(this).append($(ui.draggable).clone());
        //console.log($(ui.draggable));
        }
        });

});

for the drag & drop which works how I was hoping for, but whatever the user drags onto the the right side (#rightcol) is lost when a new search is submitted. I have tried changing the form submit to use ajax with jquery like this

 $(document).ready(function() {
          $("#form").submit( function () {    
          $.post(
           'p_search.php',
            $(this).serialize(),
          function(data){
              //data is what i want to be draggable
              //call other function here
              $(".build").html(data).load();
            }
          );
          return false;   
        });   

 });

Which works great, but the divs(.result) are not draggable. Is there a way to easily initialize the (.result) elements without refreshing the page?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T02:30:22+00:00Added an answer on May 24, 2026 at 2:30 am

    I believe they’re not draggable because they were created after you’ve defined which items are draggable.
    (meaning – they’re created after the $(".result").draggable(... call.)
    I think you should take a look at live()

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to create a workflow bar on a web page. The items in
I'm trying to create a custom search but getting stuck. What I want is
I'm trying to set up a site which allows users to create their own
I am trying to create a system which allows local network users to collaborate
I am trying to create a simple page that enters data in to a
I am trying to create a custom accordion for my page to that display
I'm trying to create a search engine for all literature (books, articles, etc), music,
I have a aspx page in which i create reports and charts on the
I want to create a web page that has two links. One that downloads
I am trying to add a page to my application which will show a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.