Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function savePosition(){
- var items = [];
- $(".column_builder").each(function(){
- var columnId = $(this).attr("id");
- $(".item", this).each(function(i){ //order mulai dari 0
- var item = {
- id: $(this).attr("id"),
- column: columnId,
- order: i+1
- }
- items.push(item);
- });
- });
- $("#process").html("saving...");
- var shortorder = {items : items};
- $.ajax({
- url: "http://localhost/folder/index.php?action=save",
- async: false,
- data: shortorder,
- dataType: "html",
- type: "POST",
- success: function(html){
- $("#process").html(html);
- }
- });
- }
Advertisement
Add Comment
Please, Sign In to add comment