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

  • SEARCH
  • Home
  • 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 8927637
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T08:15:49+00:00 2026-06-15T08:15:49+00:00

I have a JavaScript file with jQuery.pep (Drag and Drop jQuery plugin). I’m starting

  • 0

I have a JavaScript file with jQuery.pep (Drag and Drop jQuery plugin). I’m starting the plugin With this code:

Drag.pep();

Now, I don’t know how to disable/stop it. Here is a code section from the file: jquery.pep.js. I think it might help you to answer:

$[pluginName] = {
  stopAll: function () {
    disable = true;
    return this;
  },
  startAll: function () {
    disable = false;
    return this;
  }
};

The Variable “pluginName” is “pep”. Here is the full jQuery pep code (github):

Please help.

Thank you!

  • 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-06-15T08:15:51+00:00Added an answer on June 15, 2026 at 8:15 am

    that should probably do it:

    $.pep.stopAll(); // stops all peps
    

    edit:

    in the code there is a function which could be called on an instance object:

    Pep.prototype.forceStop = function(){
      $(this.el).trigger( this._endTrigger );
    };
    

    the instance is built here and saved into the data-attribute:

    // A really lightweight plugin wrapper around the constructor,
    // preventing against multiple instantiations
    $.fn[pluginName] = function ( options ) {
        return this.each(function () {
            if (!$.data(this, 'plugin_' + pluginName)) {
                $.data(this, 'plugin_' + pluginName, new Pep( this, options ));
            }
        });
    };
    
    
    $('your-selector').data('plugin_pep').forceStop();
    

    i tried to do that, it called the forceStop method, but it did not end up doing that. i researched and think what it does is to stop an animation which is currently in progress.

    what you could do now is to override the drag-method which could be given with the options when you need it, and immediatly force the stop when the animation is triggered.

    i do not like that much, but as i see the code right now, i dont see any chance of doing it another way (docs are missing here ;-()

    this should work:

    var myPep = $('your-selector').data('plugin_pep');
    myPep.options.drag = function(ev, obj) {
      obj.forceStop();
    };
    

    edit2: if you want to make it draggable again, just override the function again with an empty function:

    myPep.options.drag = function() {};
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a remote javascript file containing a custom jQuery event handler. When this
This is my jQuery AJAX code and this javascript file is placed in C:\workspace\search-ui\search-ui\src\main\webapp\themes\client\javascript\agile.js
On my site I have one global Javascript file which includes jQuery and code
i have a function like this in my external javascript file (jQuery is already
I have a javascript file and I want to include jquery in this js
I have an external javascript file called plugins.js which has all my jquery code
I have $ symbol in my javascript file to identify jQuery funcionality. Now I
I have a few JavaScript files with some jQuery code. I am including this
I have a simple JavaScript file that has three jQuery $document.ready functions. All three
Suppose I have a Javascript file function js_main(args){ /* some code */ var x

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.