sortable

jquery-ui sortable, prevent item from being moved

i have this list <ul> <li class="line"><a href="#" class="drag">header(do not sort)</a></li> <li class="line"><a href="#" class="drag">line one</a></li> <li class="line"><a href="#" class="drag">line two</a></li> </ul> how can i prevent the first li from being moved? ...

jQuery UI's Sortable - how do I style my 'li.ui-state-highlight' ?, always comes up white bg color

$("#sortable").sortable({ placeholder: '.ui-state-highlight' }); Above that I have in my stylesheet, .ui-state-highlight { background-color: #F6F698; height: 1.5em; line-height: 1.2em; border: dashed 1px gray; }, and whenever I drag an li, the placeholder has just a black border, looks exactly like the norma...

jQuery Cookie with 'iGoogle/Netvibes' UI

Hi, I have this single-page site that has 4 columns with draggable/droppable/collapsible boxes. I can drag and drop boxes in any of the 4 columns and collapse/expand the boxes. The interface actually works real fine. I'm now trying to get jQuery Cookie to remember the placement of the boxes, how the users have rearranged the boxes and if...

adding minus icon at the end of sortable

Hi Everyone, I am trying to add minus icon at the end of sortable item, but i am not able to do this, kindly help me in that concern. I am using jqueryui for that. Thanks, <ul id="sortable"> <li class="ui-state-default"><span class="ui-icon ui-icon-arrowthick-2-n-s"></span>Item 1<span class="ui-icon ui-icon-circle-minus"></span></...

Jquery UI dialog and sortable columns #dialog class issue

Hello @all , I succeed to create a sortable portlet system for a excisting cms. I also made a dialog pop where i can change true a form the title and in the future some more content within the dialog ,for each portlet. However my issue is that the #dialog shows the form inside my page before i click the icon. When i click the icon , t...

jQuery: Sortable nested list?

Hi, i'm building a website which has a parent-child Paging structure. I'm looking for a convenient way to administrate the website structure. I want the pages to be sortable Releasing the jQuery sortable code on my generated sitemap (nested UL), doesn't work properly... $('ul.SiteMap ul').sortable(); What's really important is t...

jquery sortable cannot be dragged outside of accordion

I have 2 connected sortable lists. One is inside an accordion. When I try to drag items from the sortable in the accordion, the helper disappears as soon as I get outside of the accordion. I can drop to one of the other connected sortables and the item will display, but it just doesn't display while I'm dragging. The accordion also s...

removing div from a jquery sortable

Hi guys, I've developed a "Google-Maps-like" user interface for my intranet where users can add steps to calculated routes and distances. I'm using sortable divs to reorder steps. Now I want to remove steps, but my JavaScript/jQuery code doesn't work at all. Can you help me? My jQuery code: $(document).ready(function() { $("#s...

How to undo/redo a sortable action in jqueryui?

Hi there, I have a sortable list(jquery ui), could you advise if it is possible to implement 'undo/redo' base on sortable? Imagine that, a item is dragged to a new placeholder, then I click "undo" button and the item will move to its original position. If I click "redo" button and the item will move to that new placeholder. Maybe some...

jquery sortable: get list behavior without an <ul>?

This plugin (jQuery UI's Sortable) gives me behavior I prefer if I use a list, but I need divs in order to get the formatting I want. Specifically, with a list it gives me good positioning, and it knows the right direction to shift things out of the way in. Everything works better with a list - except the formatting stuff I need from the...

jquery event element

I have this code: $(".testing").sortable({ helper: fixHelper, containment:$("testing").parent(), start:function(){ if($(event.target).hasClass("test")){ alert("hello"); } if($(this).hasClass("test")){ alert("hello"); } } }...

jQuery Sortable and Droppable

I want to have a list that is sortable, but I also want the elements in that list to be droppable to the divs I have defined as droppable. I can't seem to find a way to do it. Any ideas? ...

jQuery - manipulate dropped element in sortable list

Hi there, I have a draggable list (.field) where you can drag & drop items from it into a sortable list (.sortlist). I did it this way because I didn't want the master list (.field) altered in any way. It works fine, except I cannot work out how to manipulate the dropped field in a sortable list. I can do it from a draggable into a dr...

how do I move list elements in jQuery UI Sortable without the mouse, purely in jQuery?

I want to just set up a link that allows the user to jump a given sortable list element to the top of the list. I need something like $('.sortable li:last-child').move('.sortable li:first-child'); ...where I can just cause a link to pop any list element up to the top of the list. Never mind! I found the answer. $(id).prependTo($('#li...

sortable lists, with sortable lists...

hello there - i'm trying to have 3 levels of lists all of which are sortable & draggable into each other. Basically trying to set up an easy way to manage navigation menus with multiple levels. Its 90% there but for some reason it wont save an item into a child list. It just seems to get the parent id of the list it came from?! ie. a ...

How to display the new order according to my saved ui position?

I had stored user id, div id, ui.position.left and position.top in to my database, how can to display the new order which I stored in database? $(function() { $(".column").sortable({ connectWith: '.column', stop : function (event, ui) { alert(ui.item.text); //callback function $.post("Layout",...

jquery - setting a limit of items, that can be dragged into a list

Hi, i have this two lists, from which i can move items from one to another with jquery ui and connect lists, with ajax. If an item is pulled over, a message is generated in a php file and then it appears on screen. Now i want that for example the right list should be allowed to contain ten items at max. It would be great if it would be ...

jQuery drag element into sortable list that has initial state as hidden...

I can't seem to drag an element into sortable list that has initial state as hidden (ie. display:none). Each row's html looks like this: <div class="dragbox" id="item1" > <h2>Expression 1<span id="exp1"></span></h2> <div class="dragbox-content" > <ul class="dragrow1"></ul> <ul class="dragrow2"></ul> </div> </div> But in...

jQuery Sortable Divs, replicate BBC home page

Hi there I am trying to replicate the sortable portals design as seen on the bbc home page, using Jquery. I have used the code from the jQuery ui site to recreate the drag and drop portlets, as shown here. $(function() { $(".column").sortable({ connectWith: '.column' }); $(".column").disableSelection(); }); H...

Help with changing index in javascript/jquery

I have an javascript array, which looks like: var styles = new Array(); styles[0] = { ... Position: 0, ... }; styles[1] = { ... Position: 1, ... }; styles[2] = { ... Position: 2, ... }; ... styles[N] = { ... Position: N, ... }; I use this array to display a list, where each item is a div. The end result is this: <div id="container"> ...