Yet again another issues has come up and i will do my best to explain has i
can't give link. I have a block of div that has information about a hotel
and inside that div i have the tabs. I have a function that takes those
divs clone the dom element to re order it in a different way. the code to do
that is here:
var x;
for(x = 0; x < length; x++)
{
var string_length = sort[x].length;
var table_index = parseInt(sort[x].substr((string_length - 1))) + 1;
var div_index = table_index - 1;
new_table += '<tr>';
new_table += $('#trip_finder_hotel tr:eq(' + table_index + ')').html();
new_table += '</tr>';
//get the current top div attributes for id and class
new_div[x] = $('#hotel_information div[@class=hotel_selection]:eq(' +
div_index + ')').clone();
/*var div_id = $('#hotel_information
div[@class=hotel_selection]:eq(' + div_index + ')').attr('id');
new_div += '<div class="hotel_selection" id="' + div_id + '">';
new_div += $('#hotel_information div[@class=hotel_selection]:eq(' +
div_index + ')').html();
new_div += '</div>';*/
}
$('#trip_finder_hotel').empty();
$('#trip_finder_hotel').html(new_table);
$('#hotel_information').empty();
//$('#hotel_information').html(new_div);
var div_length = new_div.length;
//alert(new_div[0].html());
for(x = 0; x < div_length; x++)
{
$('#hotel_information').append(new_div[x]);
}
//recreate the tab events
$('div.tabset div[@id^=hotel_tab_]').each(function(index)
{
//alert(index);
$(this).tabs();
});
So after i get all the DOM element in the new order i then empty the contain
the holds all the div and the append each dom element in the array to the
container. On the initial load of the page everything works fine in IE the
issue come when i start using the tabs(and it is very strange).
let say there is 3 hotel and i look at the first one and click on those
tabs. Now i reorder the hotels. for the hotel tabs i clicked on, they do
not do anything anymore but the hotel tabs i did not click on do still work.
it seems that if i use the tab sand then reorder the list, the tabs i used
don't work anymore but the one i did not use still work and this only
happens in IE 7/6, FF works fine.
I have also tried .clone(true) and same thing happens. I hope the code i
gave you will help with this issue.
PS. man i HATE IE!!!
Klaus Hartl wrote:
>
>
> Eridius