views:

65

answers:

1

Could anyone can tell me how to add effect to all divs?

jQuery:

data = $("#sortable_list1").sortable("serialize");

update:function()
  {  

   $.ajax({
    data:serial,
    url:"list.php",
    type:"post",
    success:function(data){
      $("#serverResponse").html(data);
      }
   });    
  }

Html:

I have 2 divs which id is sortable_list1

item1 item2 item1 item2

but it only first sortable_list1 can be serialize.how to sorable second or more? thanks

A: 

You can't have two elements with same id. Id is an attribute that identifies the element on a page, so instead of having two divs with same id i'd suggest you adding same class to them and then doing $('div.yourGivenClass').sortable...

Eimantas
I tried,but it didn't work.only first class can be serialize
ekenfire
Can you edfit you question and add the code that you modified, in response, to Eimantas' answer?
belugabob