Is dynamic div loading taking more time than static div in HTML? -


In my application, a large number of divs are dynamically presented in an HTML page through the use of JavaScript In fact, there are more than 100 dynamically created divs. Loading content from server side, it is taking longer time to load static devices with static devices. How can I reduce the time it takes to load dynamic devices? This is the sample code I am using:

  var ul_slide = document.createElement ('ul'); Var slide_div = document.createElement ('div'); Slide_div.setAttribute ("square", "slide"); (Var i = 0; i & lt; data.arrayItems.length; i ++) {Warning (data. Arrays.length); Var postId = data. Ritem [i] .postId; Var tag = data. Ritem [i] .tag; Var li_slide1 = document.createElement ('li'); Var img_link1 = document.createElement ('a'); Var linka = "#" + postId; Img_link1.setAttribute ("href", link); Img_link1.setAttribute ("class", "click"); Var img_slide1 = new image (); Img_slide1.style.width = "15 9px"; Img_slide1.style.height = "100px"; Img_slide1.setAttribute ("src", data.arrayItems [i] .url); Img_link1.appendChild (img_slide1); Li_slide1.appendChild (img_link1); Ul_slide.appendChild (li_slide1); Slide_div.appendChild (ul_slide); Div.innerHTML = ""; Div.appendChild (slide_div); }  


Comments