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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T07:12:44+00:00 2026-05-29T07:12:44+00:00

I have this Drag Drop UI, here , created from this tutorial http://net.tutsplus.com/tutorials/javascript-ajax/inettuts/ I

  • 0

I have this Drag Drop UI, here, created from this tutorial http://net.tutsplus.com/tutorials/javascript-ajax/inettuts/

I am having problems when I don’t want a widget to be undraggable/unsortable. At the moment it is set that ‘Widget 1’ can’t be dragged. If I remove it from the widgetIndividual object it breaks the whole functionality. Ideally these should be defined on the page and not in a separate js file.

If I remove the following code from widgetIndividual it breaks everything.

            weather : {
                movable: false,
                removable: true,
                collapsible: true,
                editable: false
            }

Please help get this working.

You can download code here

Thanks

  • 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-29T07:12:45+00:00Added an answer on May 29, 2026 at 7:12 am

    There is a bug in the method makeSortable that produces an invalid jQuery selector.

    Here is the method (I have removed the not relevant code):

    makeSortable : function () {
    
        var iNettuts = this,
            ...
            $sortableItems = (function () {
    
                var notSortable = '';
    
                $(settings.widgetSelector,$(settings.columns)).each(function (i) {
                    if (!iNettuts.getWidgetSettings(this.id).movable) {
                        if(!this.id) {
                            this.id = 'widget-no-id-' + i;
                        }
                        notSortable += '#' + this.id + ',';
                    }
                });
    
                // when "notSortable" is empty, the selector
                // is "> li:not()" which is invalid
                return $('> li:not(' + notSortable + ')', settings.columns);
    
            })();
    
        ...
    
    }
    

    The $sortableItems is obtained (with an auto-executing function) by checking the movable option of the widgets and return a filtered list using the :not() pseudo-selector.

    The problem is that when all widgets are movable, the variable notSortable will be empty and this will produce an invalid jquery selector > li:not().

    This is happening when you remove the specific settings for the weather widget. The weather has movable: false. If you remove the settings, all widgets will be movable, and the bug occurs.

    Change the return statement to only use :not() when notSortable is not empty:

    return $('> li' + ( notSortable && notSortable !== '' ? ':not(' + notSortable + ')' : '' ), settings.columns);
    

    DEMO

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

Sidebar

Related Questions

i have created the drag and drop work. Here i can place the drag
i have done drag and drop using with jquery. here i have issue that
I have an html like this: <div id=container1> <div class=dragme>drag me</div> </div> <div id=container2>
I have this line in a javascript block in a page: res = foo('<%=
I have this string 'john smith~123 Street~Apt 4~New York~NY~12345' Using JavaScript, what is the
I have Drag/Drop functionality in my page embedded using YAHOO.js which is initalized at
I'm using the Draggable/Droppable functionality of Jquery to allow drag-and-drop from a TreeView to
I'm using html5 to create drag and drop image upload functionality. This works great
so I have built my own drag and drop shopping cart(very basic) using Jquery
Interested in building my own drag'n'drop file uploader using JQuery/AJAX/PHP. Basically I want 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.