Search Results

Search found 340 results on 14 pages for 'sortable'.

Page 3/14 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • jQuery + Sortable + live

    - by user202411
    I'm adding list items to a page dynamically with $.get, then appending them to the OL element. Pretty usual to this point. But jQuery isn't aware of these new items when they get loaded into the page, and I'm not being able to make them sortable. I made some trials with jQuery Live, but didn't get anywhere whit that...

    Read the article

  • jQuery sortable Div's

    - by kai lange
    is it possible to sort direct between two or more div's/boxe's and return the complete data (var order = ...) ? Online Demo: http://jsbin.com/alegu4 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>jQuery Dynamic Drag'n Drop</title> <script type="text/javascript" src="http://cdn.jquerytools.org/1.2.5/jquery.tools.min.js"></script> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.8/jquery-ui.min.js"></script> <style> body { font-family: Arial, Helvetica, sans-serif; font-size: 16px; margin-top: 10px; } ul { margin: 0; } #s1,#s2 { float: left; width: 400px; } #s1 li,#s2 li { list-style: none; margin: 0 0 4px 0; padding: 10px; background-color:#00CCCC; border: #CCCCCC solid 1px; color:#fff; } </style> <script type="text/javascript"> $(document).ready(function(){ $(function() { $("#s1 ul,#s2 ul").sortable({ opacity: 0.6, cursor: 'move', update: function() { var order = $(this).sortable("serialize") + '&action=updateRecordsListings'; //$.post("updateDB.php", order); alert(order); } }); }); }); </script> </head> <body> <div id="box"> <div class="box" id="s1"> <ul> <li id="recordsArray_1">1. Lorem ipsum dolor sit amet, consetetur</li> <li id="recordsArray_2">2. Lorem ipsum dolor sit amet, consetetur</li> <li id="recordsArray_3">3. Lorem ipsum dolor sit amet, consetetur</li> <li id="recordsArray_4">4. Lorem ipsum dolor sit amet, consetetur</li> </ul> </div> <div class="box" id="s2"> <ul> <li id="recordsArray_5">5. Lorem ipsum dolor sit amet, consetetur</li> <li id="recordsArray_6">6. Lorem ipsum dolor sit amet, consetetur</li> <li id="recordsArray_7">7. Lorem ipsum dolor sit amet, consetetur</li> <li id="recordsArray_8">8. Lorem ipsum dolor sit amet, consetetur</li> </ul> </div> </div> </body> </html> Please note it's not the same like my other post - thanks!

    Read the article

  • Placeholder is not shown in jquery sortable, drag & drop

    - by balakrishnan
    I can't show Place holder for the sortable items in a div. &lt;script type="text/javascript"&gt; $(function() { $("#userContent").sortable({ handle: '.close_button', connectWith: '#userContent', placeholder: 'placeholder', forcePlaceholderSize: true, tolerance: 'pointer', revert: true, }); }); </script> <style type="text/css"> .webtitle_paragraphs { width:98%; float:left; border:1px solid #0099CC; margin:5px; } .close_button { display:block; overflow:visible; visibility:visible; height:20px; background:#0099CC; width:100%; } .placeholder { background: #f0f0f0; border:1px dashed #ddd; visibility: visible !important; } .webtitle input { width:98%; font: bold 20px verdana; border:0px; } .paragraph_txt textarea { width:98%; height:auto; border:0px; } </style> </head> <body> <div id="userContent"> <div class="webtitle_paragraphs" id="div4463_text"> <div class="close_button" id="close_4463"><a onclick="removeDiv('div4463_text');"><img src="images/close_button.png" alt="close" width="15" height="15" border="0" align="right"/></a></div> <div class="webtitle_paragraph"> <div class="webtitle"> <input value="Title" name="webtitle4463" type="text" class="text _4463" /> </div> </div> </div> <div class="webtitle_paragraphs" id="div7192_image"> <div class="close_button" id="close_7192"><a onclick="removeDiv('div7192_image');"><img src="images/close_button.png" alt="close" width="15" height="15" border="0" align="right"/></a></div> <div class="webtitle_paragraph"> <div class="paragraph"><img src="https://localhost/web20/user_site_designs/images/noImage.jpeg" id="img7192" class="imageCntrl" onclick="uploadFile(7192)"/> <input type="hidden" name="imgName7192" id="imgName7192" value="" class="image _7192"/> </div> </div> </div> <div class="webtitle_paragraphs" id="div9683_paragraph"> <div class="close_button" id="close_9683"><a onclick="removeDiv('div9683_paragraph');"><img src="images/close_button.png" alt="close" width="15" height="15" border="0" align="right"/></a></div> <div class="webtitle_paragraph"> <div class="paragraph_txt"> <textarea class="paragraph _9683" name="myTextarea9683" id="myTextarea9683">Paragraphp</textarea> </div> </div> </div> </div> Thanks is advance.

    Read the article

  • IE7 Jquery UI Sortable problem

    - by Qwibble
    Hey guys, I'm using Jquery UI sortable in my current project to make boxes drag and drop-able into new columns. It works in all modern browsers apart from ie7, in which you can drag and drop, but when you drop, it completely ruins the content of the box you're dropping. I've sat and looked at this for ages and have no clue what the problem is. Do any of you have any idea? Here's a demo of what's going on. View it in ie7.

    Read the article

  • nested sortable table rows jquery

    - by FLY
    Hi, I am trying to sort rows of a table, and put them as 'child' elements of a table row I found this: http://code.google.com/p/nestedsortables/ this works with ul li lists, but i want to build it for a table. <table> <thead> <th>tablehead</th> </thead> <tbody> <tr><td>somevalue</td></tr> <tr><td>somevalue2</td></tr> </tbody> </table> so yeah you can use jquery.sortable() and sort the rows, but i want 'somevalue' to be become a child element of 'somevalue2' if you drag 'somevalue' over 'somevalue2' I don't know if it is posible with a table. can anyone help me? Thnx!

    Read the article

  • jQuery Sortable + Droppable z-index problem

    - by unknowndomain
    I am having a probelm with the z-index of my sortable object not being above my droppable. If you visit http://clareshilland.unknowndomain.co.uk/. Press Ctrl + L to bring up the login screen. Enter the username clare and the password shilland. It will then load in the admin bar and if you click manage gallery. A pop down thumbnail view will appear with all the photos from that gallery. The issue is that when you drag the 'polaroids' from the grid to the delete area they are under the delete area. I tried putting the delete area inside the same div as the grid but it makes no difference, I just don't know what to do at this point so any help would be a massive help!

    Read the article

  • jQueryUI: Sortable <thead> messes up ie ANY IE when css display property is set to RELATIVE

    - by Zlatev
    As the title describes most of the problem. Here is the example code that works as expected in Firefox. Could someone provide a workaround or fix? In action JavaScript $(function() { $('table thead').sortable({ items: 'th', containment: 'document', helper: 'clone', cursor: 'move', placeholder: 'placeHold', start: function(e, ui) { $overlay=$('<div>').css({ position: 'fixed', left: 0, top: 0, backgroundColor: 'black', opacity: 0.4, width: '100%', height: '100%', zIndex: 500 }).attr('id','sortOverlay').prependTo(document.body); $(this).parent().css({ position: 'relative', zIndex: 1000}); }, stop: function(e, ui){ $('#sortOverlay').remove(); $(this).parent().css({ position: 'static' }); } }); }); CSS <style type="text/css"> table { background-color: #f3f3f3; } table thead { background-color: #c1c1c1; } .placeHold { background-color: white; } </style> HTML <table> <thead><th>th1</th><th>th2</th><th>th3</th><th>th4</th></thead> <tbody> <tr> <td>content</td><td>content</td><td>content</td><td>content</td> </tr> </tbody> </table>

    Read the article

  • Ruby on Rails sortable list

    - by mdgrech
    I created a sortable list in my RoR project, unfortunately it's not saving the list position. Upon page refresh the items return to their normal spot. I've pasted the code below or you can git it: git://github.com/mdgrech/23notes-.git app/views/notes/index.html.erb ///////////////////////////////////////////////////////////////////////////////////////////// <div id="newNoteDiv"></div> <ul id="notesList"> <% for note in @notes %> <li id="<%=h note.position %>"> <span class="handle">[drag]</span> <div id="listContent"> <h3><%= link_to note.title, edit_note_path(note) %></h3> <p><%=h note.content %></p> <%= link_to "Destroy", note, :confirm => 'Are you sure?', :method => :delete %> </div> </li> <% end %> </ul> <%= sortable_element("notesList", :url => sort_notes_path, :handle => "handle" ) %> app/controllers/notes_controller.rb ////////////////////////////////////////////////////////////////////////////////////////// def index @notes = Note.all(:order => "position") end def sort params[:notes].each_with_index do |id, index| Note.update_all(['position=?', index+1], ['id=?', id]) end render :nothing => true end config/routes.rb ////////////////////////////////////////////////////////////////////////////////////////// map.resources :notes, :collection => { :sort => :post } map.root :notes app/models/note.rb ////////////////////////////////////////////////////////////////////////////////////////// class Note < ActiveRecord::Base acts_as_list end

    Read the article

  • jQuery UI sortable issue with helper Y offset value being same as scroll offset on FireFox only

    - by James
    I have a problem with a jQuery UI 1.7.2 sortable list in Firefox, IE7-8 work fine. When I'm scrolled down a bit, the helper element seems to have an offset of the same height that I'm scrolled down from the mouse pointer which makes it impossible to see which item you originally started dragging. How do I fix this or work around the issue? If there is no fix what is a really good alternative drag-able plugin? Here are my initialization parameters for the sortable. $("#sortable").sortable( {placeholder: 'ui-state-highlight' } ); $("#sortable").disableSelection();

    Read the article

  • jQuery UI - Sortable isn't firing?

    - by Kenny Bones
    Hi, I'm trying to get the jQuery UI sortable plugin to work and I've created a list that looks like this: <ul id="sortable"> <li>Item 1</li> <li>Item 2</li> <li>Item 3</li> <li>Item 4</li> <li>Item 5</li> </ul> And I've included the plugin script files: $(function() { $("#sortable").sortable(); alert('test'); $("#sortable").disableSelection(); }); So I just tried putting the alert box before .sortable is run and the alertbox is showing. But putting it after .sortable isn't working. Which means that .sortable is failing right? I've included the scripts and put them in the head of the html document. <script type="text/javascript" src="js/jquery.ui.core.min.js"></script> <script type="text/javascript" src="js/jquery.ui.mouse.min.js"></script> <script type="text/javascript" src="js/jquery.ui.sortable.min.js"></script> <script type="text/javascript" src="js/jquery.ui.widget.min.js"></script> Which is correct right? And the function that actually runs .sortable is in a merged js file along with all other js snippets and plugins.

    Read the article

  • jquery sortable problem with ie

    - by corroded
    i am using jquery to sort my lists and i have run into a dead end. First, I checked the jquery site if theirs work on ie7, thats great, it does. next, i checked mine without the styles(so there possibly wont be anything that's intercepting or affecting jquery stuff). but i still get this weird error in ie7 when you sort items in the inner list(i have nested lists) they overlap each other, destroying the layout. if you sort the contianer lists, they work fine! here's a jsfiddle of what i mean: http://jsfiddle.net/GDUpa/ note that if you drag demonstration one or two spots(in ie), it will overlap with the other links. BUT if you drag POC (it will select the whole thing including the links under it), it works fine! is something wrong with my markup?

    Read the article

  • Jquery UI Sortable Item Contents

    - by bluedaniel
    So I have this shopping list coded in php and js: http://www.whatcouldicook.com/recipes/planner So people can add, delete or sort the list and thats fine, I dont want multiple lists and instead just have a list item containing a heading tag to represent a new list. All this works and then using serialize I can save the ordering/modifying of the list. I don't know how to get the list contents however as these will be dynamic from the user. All the code is on that url so hopefully you can examine the code there. Thanks everyone

    Read the article

  • jQuery Sortable Cannot Click After Sort Issue

    - by Johan
    I have a table that is being sorted by the TR tags, everything works fine except that I have to click twice on any item in the list after something has been moved for anything to respond, on links etc. Do I have to call some function after the list has been sorted to re-activate it so that I don't have to click twice on items?

    Read the article

  • Can jQuery UI's Sortable handle complex selectors for the items option?

    - by jverdi
    I have list items in an unordered list that when double clicked, can be edited in place via a wysiwyg editor. $('ul.mtm_section').sortable({ disabled: true, distance: 10, items: '> li:not(:has(form))' }); My goal is to prevent the list item from being sorted while it is being edited - aka once a form element has been swapped in place of the contents. Unfortunately my selector for items is not working. Is sortable able to handle complex selectors like these? If not, are there other clever means to disable some items from being sortable, perhaps a callback function? I would prefer to rely on this sortable option, as the wysiwyg plugin is deeply nested with jEditable and as far as I know does not open up any events for me to hook into. Using jQuery 1.4.2 and jQuery UI 1.8.1

    Read the article

  • Is there any reason why jQuery Sortable would work in IE/Chrome but not Firefox?

    - by DNS
    I have a fairly straightforward list of horizontally floated items, like this: <div class="my-widget-container"> <div class="my-widget-column">...</div> ... </div> Both the container and each column have a fixed width, set using jQuery's .width(). The container is position: relative and the column is float: left and overflow: hidden. Not sure if any other styles/properties are relevant. When I apply a jQuery-UI sortable to this, the result is exactly what I'd expect in Chome 8 and IE 8; the columns can be dragged around to change their order. But in Firefox 3.6 I can click an item and drag to create a new sort-helper, yet the actual sort never happens; the real item's position in the DOM never changes. I dug around a little in Sortable, and added a debug print to _intersectsWithPointer. Whenever the drag helper moves, Sortable runs through its list of elements and uses this method to determine whether the drag helper has passed over one. What I saw was that item.left had the same value for all my columns, which is obviously not correct, and probably the source of the problem. It looks like all columns had a left position corresponding to that of the first column. I'm using jQuery 1.4.3 and jQuery UI Sortable 1.8. Those aren't the very latest versions, but they're pretty recent, and I don't see anything in the Sortable release notes that indicates any such problem has been fixed. Does anyone know what might be happening here, or have any ideas for further debugging?

    Read the article

  • JQUERY - jQuery UI Nested Sortables 2 - help getting it working

    - by nobosh
    Hello, I'm interested in using the following JQUERY - http://lucaswoj.com/2010/01/jquery-ui-nested-sortables-2/ However, I can't seem to get a demo instance of the plugin work. Here's the code I'm using: <script type="text/javascript"> $('#findit').nestedSortable({}); </script> <div > <ul id="findit"> <li> List Item Content <ul></ul> <li> <li> List Item Content 2 <ul></ul> <li> <li> List Item Content 3 <ul></ul> <li> <li> List Item Content 4 <ul></ul> <li> <ul> </div> Any ideas? Thanks

    Read the article

  • jqGrid - how to change title based on colModel sortable property

    - by Greg
    When the mouse hovers over each column I'd like the tooltip to indicate whether that column is sortable. I am able to change the title attribute with something like this: $("#List .ui-th-column").each(function(i) { var isSortable = i % 2; $(this).attr('title', isSortable ? "Not Sortable" : "Click header to sort."); }); I'd like to replace the demo expression 'i % 2' with a check of the colMode's sortable property, but I can't figure out how to get the value of the colModel's sortable property. colModel: [ { name: 'Name', index: 'Name', width: 100, sortable: true }, { name: 'Note', index: 'Note', width: 200, sortable: false } ] I've tried .getGridParam and .getColProp but I don't think the syntax I'm using is correct.

    Read the article

  • jQuery: What to do with the list that sortable('serialize') returns?

    - by bartclaeys
    With jQuery I'm retrieving positions of a sortable list using 'serialize', like this: var order = $('ul').sortable('serialize'); The variable 'order' then receives the following: id[]=2&id[]=3&id[]=1&id[]=4&id[]=5 Now how can I use this data in an ajax call? This is how I plan to do it, but it's ugly and I can't change the parameter name 'id': $.post('ajax.php?'+order,{action:'updateOrder'}); Maybe I need to unserialize, then implode the variable 'order' and assign it to just one parameter?

    Read the article

  • If I do "jquery sortable" on a contenteditable item(s), I then can't focus mouse anywhere inside con

    - by Matej
    Strangely this is broken only in Firefox and Opera (IE, Chrome and Safari works as it should). Any suggestion for a quick fix? <html> <head> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js" type="text/javascript"></script> <script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.2/jquery-ui.min.js" type="text/javascript"></script> <script> $(document).ready(function(){ $('#sortable').sortable(); }); </script> </head> <body> <span id="sortable"> <p contenteditable="true">One apple</p> <p>Two pears</p> <p>Three oranges</p> </span> </body> </html>

    Read the article

  • How can I drag from a connected vertical list to the first item of a another list below with jQueryUI Sortable?

    - by Denis Hoctor
    Hi all, I have have several ULs vertically down a page. They are setup using jQueryUI's sortable(). My live example is: http://jsfiddle.net/pborreli/pJgyu/ I can drag from answers to make it the final element in questions. But when I drag from questions to answers the placeholder jumps to the second item in the questions list. At that point I can then drag it to the top. Any ideas why I am having this issue dragging from a list above to the first element of a list below? I've tried editing the padding and margin on both the lists and the sortable items. Thanks, Denis

    Read the article

  • Jquery Help : Draggable to Sortable and then back to draggable again.

    - by Swamy g
    I have a pool of items in the drag list which is connected to a sortable using connectToSortable option. Now I want to remove some items from this sort list and move them back to the drag list. Sort of like an undo. Suppose the user moves some 5 items to sort list and decides he/she wants only 4 items, and decides to just drag the unwanted item from the sortlist TO the drag list. How do I accomplish this WITHOUT adding a "remove" link in the sort list. Thanks a lot. For more information please refer to http://the-stickman.com/web-development/javascript/jquery-dropping-items-from-a-draggable-list-to-a-sortable-list/

    Read the article

  • Problem with jQuery plugin TinySort

    - by Volmar
    I'm trying to sort a list with the help of jQuery and the TinySort-plugin, and it works good but one thing is not working as i want. My Code is: <!doctype html> <html> <head> <meta charset="UTF-8" /> <title>TinySort problem</title> <script type="text/javascript" src="http://so.volmar.se/www/js/jquery.js"></script> <script type="text/javascript" src="http://so.volmar.se/www/js/jquery.tinysort.min.js"></script> <script type="text/javascript"> function pktsort(way){ if($("div#paket>ul>li.sortdiv>a#s_abc").text() == "A-S"){ $("div#paket>ul>li.sortdiv>a#s_abc").text("S-A"); $("div#paket ul li.sortable").tsort("",{place:"org",returns:true,order:"desc"}); }else{ $("div#paket>ul>li.sortdiv>a#s_abc").text("A-S"); $("div#paket ul li.sortable").tsort("",{place:"org",returns:true,order:"asc"}); } } </script> </head> <body> <div id="paket" title="Paket"> <ul class="rounded"> <li class="sortdiv">Sort: <a href="#" onclick="pktsort();" class="active_sort" id="s_abc">A-S</a></li> <li class="sortable">Almost Famous</li> <li class="sortable">Children of Men</li> <li class="sortable">Coeurs</li> <li class="sortable">Colossal Youth</li> <li class="sortable">Demonlover</li> <li class="sortable">Femme Fatale</li> <li class="sortable">I'm Not There</li> <li class="sortable">In the City of Sylvia</li> <li class="sortable">Into the Wild</li> <li class="sortable">Je rentre à la maison</li> <li class="sortable">King Kong</li> <li class="sortable">Little Miss Sunshine</li> <li class="sortable">Man on Wire</li> <li class="sortable">Milk</li> <li class="sortable">Monsters Inc.</li> <li class="sortable">My Winnipeg</li> <li class="sortable">Ne touchez pas la hache</li> <li class="sortable">Nói albinói</li> <li class="sortable">Regular Lovers</li> <li class="sortable">Shaun of the Dead</li> <li class="sortable">Silent Light</li> <li class="addmore"><b>This text is not supposed to move</b></li> </ul> </div> </body> </html> you can try it out at: http://www.volmar.se/list-prob.html MY PROBLEM IS: I don't want the <li class="addmore"> to move above all the <li class="sortable">-elements when i press the sort-link. i wan't it to always be in the bottom. you can find documentation of the TinySort plugin here. i've tried loads of combinations with place and returns propertys but i just can't get it right.

    Read the article

  • jQuery: How to reverse sortable('serialize') arrays from last to first?

    - by Binyamin
    The discussion begins http://stackoverflow.com/questions/654535/jquery-what-to-do-with-the-list-that-sortableserialize-returns/2920760#2920760 How to reverse it from last to first, updateList.php?id[]=5&id[]=4&id[]=3&id[]=2&id[]=1&&action=update? <ul> <li id="oreder-5">5</li> <li id="oreder-4">4</li> <li id="oreder-3">3</li> <li id="oreder-2">2</li> <li id="oreder-1">1</li> <ul> My code: $(document).ready(function(){ order=[]; $('#list ul').children('li').each(function(idx, elm) { order.push(elm.id.split('-')[1]) }); $.post('updateList.php', {'order[]': order, action: 'update'}); function slideout(){ setTimeout(function(){ $("#response").slideUp("slow", function () {}); }, 2000); } $("#response").hide(); $(function() { $("#list ul").sortable({ opacity: 0.8, cursor: 'move', update: function() { var order = $(this).sortable("serialize") + '&action=update'; $.post("updateList.php", order, function(theResponse){ $("#response").html(theResponse); $("#response").slideDown('slow'); slideout(); }); }}); }); });

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >