tags:

views:

20

answers:

0

Hallo Everyone ,i have some issues , i have attarched draggable(), droppable() and slideout() event to a dynamically created div, but after the droppable event the slideout() event does not for IE but for other browser it functions perfektly.here is my jquery code

$(xml).find('USER').each(
             function(index)
              {
                 if(i<=end && i==index)
                 { 
                  var ename= ($(this).find('ENAME').text()=='E')?'':$(this).find('ENAME').text();
                  var operator=($(this).find('OPERATOR').text()=='E')?'':$(this).find('OPERATOR').text();
                  var pnr =($(this).find('PNR').text()=='E')?'':$(this).find('PNR').text();
                  var inr=($(this).find('INR').text()=='E')?'':$(this).find('INR').text();
                  var $newDiv= $( '<div class=\"items\" id =\"'+inr +'\">'
                                 +ename+'<br/>'+operator+
                                '<br/>'+ pnr+'</div>');

                   $newDiv.mousedown(function()
                       {
                         //id =$(this).attr('id');
                        }).draggable({helper:'clone',
                                      opacity:0.5 });
                    $('div.selectedItemlist').droppable({
                                              accept:'div.items',
                                              drop:function(e,ui){
                                              var newSelectedDiv =$('<div id=\"'+ui.draggable.attr('id')+'\"></div>').html(ui.draggable.html()).
                                              addClass('dropitems');
                                                $('input#inrs').val($('input#inrs').val()+ui.draggable.attr('id')+','); 
                                                 //$('div.selectedItemlist').empty();           
                                              $('div.selectedItemlist').append(newSelectedDiv);
                                              ui.draggable.remove();
                                              $('div.selectedItemlist').css({
                                                  backgroundColor:'white',
                                                  opacity:1
                                              });
                                             newSelectedDiv.click(function(){
                                                  newSelectedDiv.slideUp(2000);

                                              });

                                          },
                                          over:function(e,ui)
                                          {
                                              $('div.selectedItemlist').css({
                                                  backgroundColor:'red',
                                                  opacity:0.2
                                              });
                                          },
                                          out:function(e,ui)
                                          {
                                              $('div.selectedItemlist').css({
                                                  backgroundColor:'white',
                                                  opacity:1
                                              });

                                          }

                                          });

                                   $newDiv.appendTo('div.suggestions');

                                    i++;
                                    }
                                  });

i read that microsoft javascript has issue when one attarches more than one event to thesame element.does anyone have an idea about that? thanks in advance.