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 3980416
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T05:17:17+00:00 2026-05-20T05:17:17+00:00

I am creating a file tree using PHP & jQuery, but I’m having trouble

  • 0

I am creating a file tree using PHP & jQuery, but I’m having trouble setting it up so I move files around. How might I go about doing this?

So if my directory is:

parent/
   images/
   css/
   js/
       js-test.js

I can move js-test.js to css folder using jQuery. I figure it involves sortable, draggable, and droppable but I cannot get it to work.

Right now I’m using a simple

$(".php-file-tree ul").sortable({
    connectWith : ".php-file-tree ul"   
});

The main problem being I don’t want to re-order items and it’s a little glitchy. I also want standard behavior allowing me to drop a file into a closed folder, which doesn’t work using this code.

  • 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-20T05:17:18+00:00Added an answer on May 20, 2026 at 5:17 am

    “I also want standard behavior allowing me to drop a file into a closed folder, which doesn’t work using this code.”

    Why not set the on drop event for each folder, removing the item (folder or file) from it’s previous list, then adding it to the list hidden inside the closed folder? From what I can guess, the lists you can move it to at the moment are the ones that aren’t ‘display: none’. So the work around would be to have a drop event for folder items.

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

Sidebar

Related Questions

What are the best practices around creating flat file database structures in PHP? A
I'm creating a xml-file for display in Excel using _di_IXMLDocument. But for some tags
I would like to create .inf file (for creating .cab file) using msbuild command
I'm creating a zip file using the class FastZip from SharpZipLib and once I
In C#, I'm creating an XML file from a DataTable using dataTable.WriteXml(filePath), and get
While creating a file synchronization program in C# I tried to make a method
I've got the following in my .css file creating a little image next to
When creating a new file with vim, I would like to automatically add some
At the moment, I'm creating an XML file in Java and displaying it in
I'm writing some documentation in Markdown, and creating a separate file for each section

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.