Note that there are some explanatory texts on larger screens.

plurals
  1. POCopying a div that contains objects to another div
    primarykey
    data
    text
    <p>Here is my code: Sorry for the quality and formatting. Basically, what i want is to copy all the contents (text,objects) of a div into another div. div #results contains a google map and some other objects. i've tried using .clone also but its not working. All text gets copied correctly but the google map in #results2 does not show up. I need to do these, because i will have to sort the divs according to a value and display them in a page and also do a system of navigation. </p> <pre><code> /*created_div=new Object();*/ var my_div=create_div_test(p[z],my_traversed_edge,board,alight,visited_bus,tot_distance,tot_time); if(my_div!=null){ v='#'; v+='results'; $('#results').html(my_div); var x='animate'; var v='#animater'; v+=div_id; x+=div_id; var visited_id='#visited'; visited_id+=div_id; created_div.my_id=div_id; var map=create_map(div_id); var poly=retrieve_results_edges(bus_stops_visited,map); var strVar=""; strVar += "&lt;span class=\"animate\"&gt;"; strVar += "&lt;input type=\"button\" id="+x+" name=\"animate\" value=\"Animate\" \/&gt;"; strVar += "&lt;\/span&gt;"; $(v).append(strVar); retrieve_the_stops(bus_stops_visited,map); var str_var=show_visited_stops(bus_stops_visited,map); $(visited_id).append(str_var); $('#'+x).bind('click',{poly:poly,map:map}, function(event) { animate(event.data.poly,event.data.map) }); set_map(map); set_polyline_color(my_traversed_edge,bus_stops_visited,map); $('#results2').html($('#results').html()); /*created_div.htmlContent=$('#results').clone(); $('#results').empty(); created_div.totaldistance=tot_distance; created_div.totaltime=tot_time; my_divs.push(created_div);*/ } } </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload