Hi Folks, Basically I am doing the content swapping here, the content swapping happening fine for the children DIVs till I swap the whole parent DIV, once I swap the parent DIVs ... only parent DIV content swapping is happening always, the swap function is not working for the children DIVs , I dont have any clue why this is happening please let me know if anybody know the root cause of the problem, any problem with using of innerHTMLs inside my function.. I want to swap the content of the child divs and parent divs as well.
please let me know the issue here and how to overcome this issue. please help me on this. Markup -------- <div class="parentSIP" style="background: #ff9900;"> <div class="dragSlot sh slot23">2_3</div> <div class="dragSlot sh slot22">2_2</div> <div class="dragSlot sh slot21">2_1</div> <div class="dragSlot sh slot20">2_0</div> </div> <div class="parentSIP" style="background: #ff9900;"> <div class="dragSlot sh slot13">1_3</div> <div class="dragSlot sh slot12">1_2</div> <div class="dragSlot sh slot11">1_1</div> <div class="dragSlot sh slot10">1_0</div> </div> <div class="parentSIP" style="background: #ff9900;"> <div class="dragSlot sh slot03">0_3</div> <div class="dragSlot sh slot02">0_2</div> <div class="dragSlot sh slot01">0_1</div> <div class="dragSlot sh slot00">0_0</div> </div> </div> JS: === var tmpEl = null; var tmpStr = ""; function swap(el) { if(tmpEl) { var tmpH = $(tmpEl).height(); var starteleH = $(el).height(); if(tmpH != starteleH) { var id = $(el).attr("id"); var tmpOvId = $(tmpEl).attr("id"); var overlayId = $("div.overlayDiv_DnD").attr("id"); alert("Single and Double Height are irrelevant"); el.innerHTML = el.innerHTML; tmpEl.innerHTML = tmpEl.innerHTML; } else { alert("Slots are relevant here"); str = el.innerHTML; tmpEl.innerHTML = str; el.innerHTML = tmpStr; } tmpEl = null; } else tmpEl = el; tmpStr = el.innerHTML; } $("div.parentSIP,div.dragSlot").click(function(e){ e.stopPropagation(); e.cancelBubble = true; swap(this); }); yours sincerely, Jay ******************************************************************* List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm Help: memberh...@webstandardsgroup.org *******************************************************************