JQuery UI Saving Sortable List
$("#list").sortable({
update : function () {
var neworder = new Array();
$('#list li').each(function() {
//get the id
var id = $(this).attr("id");
//create an object
var obj = {};
//insert the id into the object
obj[] = id;
//push the object into the array
neworder.push(obj);
});
$.post("pagewhereyouuselist.php",{'neworder': neworder},function(data){});
}
});
Also in JavaScript:
- htmlWebpackPlugin.options.title
- lodash pascal case
- react native loading
- jquery safely use $
- node js store add values in file
- how to delete object property of array javascript
- javascript sort alphabetically
- node js event emitter
- index and id together angularjs
- jquery mouseup javascript
- vuetify event handler
- convert date to string javascript
- install react js
- import library react js
- how to add all values of array together js
- post json in flutter
- form taglib in jsp
- how to prevent previous radio button active react native
- forin js
- node check if file exists
- render props
- jquery get selected option value
- input radio trigger select jquery
- makes number negative javascript