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

The Archive Base Latest Questions

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

EDIT: Here’s a link to show you my sample code: http://www.singingeels.com/jqtest/ I have a

  • 0

EDIT: Here’s a link to show you my sample code: http://www.singingeels.com/jqtest/

I have a very simple page that references jquery-1.3.2.js, ui.core.js (latest version) and ui.draggable.js (also latest version).

I have a div that I can drag around very easily (using the mouse of course):

<div id="myDiv">hello</div>

and then in JavaScript:

$("#myDiv").draggable();

This is works perfectly. But, I need to be able to simulate a ‘drag and drop’ using code alone. I have it mostly working, but the problem is that the events that are firing are the placeholder events.

If you open “ui.core.js” and scroll to the bottom… you’ll see this:

// These are placeholder methods, to be overriden by extending plugin
_mouseStart: function(event) { },
_mouseDrag: function(event) { },
_mouseStop: function(event) { },
_mouseCapture: function(event) { return true; }

Why aren’t the events being extended properly in my simulation, but when you click down with the mouse, they are? – Any ideas on how to force the _mouseDrag: property to obey the overriding extension in “ui.draggable.js”?

Solving this would be huge – and I plan to show the major benefits later.

Thanks,
-Timothy

EDIT: Here’s a link to show you my sample code: http://www.singingeels.com/jqtest/

EDIT 2: Click that link above and view-source… you’ll see what I’m trying to do. Here’s a snippet:

$(document).ready(function() {
    var myDiv = $("#myDiv");

    myDiv.draggable();

    // This will set enough properties to simulate valid mouse options.
    $.ui.mouse.options = $.ui.mouse.defaults;

    var divOffset = myDiv.offset();

    // This will simulate clicking down on the div - works mostly.
    $.ui.mouse._mouseDown({
        target: myDiv,
        pageX: divOffset.left,
        pageY: divOffset.top,
        which: 1,

        preventDefault: function() { }
    });
});
  • 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-19T02:25:25+00:00Added an answer on May 19, 2026 at 2:25 am

    There’s a question in the JQuery forum about it. It’s not resolved at the time of writing, but may have more information in the future.


    EDIT: It was answered on the forum:

    I recommend you use the simulate plugin which is what jQuery UI uses for unit testing drag and drop:

    https://github.com/jquery/jquery-ui/blob/master/external/jquery-simulate/jquery.simulate.js

    You can see examples of use by looking at the unit tests

    https://github.com/jquery/jquery-ui/blob/master/tests/unit/draggable/core.js

    https://github.com/jquery/jquery-ui/blob/master/tests/unit/draggable/events.js

    Thanks to rdworth for that.

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

Sidebar

Related Questions

Edit: The code here still has some bugs in it, and it could do
edit: many thanks for all the answers. Here are the results after applying the
So here is the XAML that I have: <ItemsControl ItemsSource={Binding Path=Groups} ItemTemplateSelector={Binding RelativeSource={RelativeSource AncestorType=Window},
I feel like I'm missing something simple here (as usual). I'm trying to read
Edit: This question was written in 2008, which was like 3 internet ages ago.
Edit: From another question I provided an answer that has links to a lot
EDIT: This was formerly more explicitly titled: - Best solution to stop Kontiki's KHOST.EXE
EDIT: Learned that Webmethods actually uses NLST, not LIST, if that matters Our business
EDIT: This question is more about language engineering than C++ itself. I used C++
EDIT What small things which are too easy to overlook do I need to

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.