Link to home
Start Free TrialLog in
Avatar of Luey
LueyFlag for United States of America

asked on

JqueryUI sortable append variable to post

I am using JqueryUI and I need to post a variable along with the array that .sortable("serialize") provides.  I tried to append but had no luck.  The code works fine until I try to append my variable.  

$("ul#adult_list").sortable({ 
         opacity: 0.6, 
         cursor: 'move',
		 update: function(){
					
					var data = $("ul#adult_list").sortable("serialize");
					
					var srt_type = $("ul#adult_list").attr('data-srt-type');
					
					data.append("srtType", srt_type);
					
					$('#message').html('<img src="/loader_small.gif"/><span class="pad_l_2">Saving Changes</span>');
				
					$.post("sortable_ajax.php", data, function(theResponse){
															  
						$("#message").html(theResponse);
						
					}); //end post
				
                }//end update function
         });

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of Julian Hansen
Julian Hansen
Flag of South Africa image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial