List not getting displayed well when created dynamically

List not getting displayed well when created dynamically

BY 04 Aug 2015 Web Application Development

Hi,

I am trying to develop a web app, and trying to create a list dynalically and trying to add slider type of checkbox.

All this im trying on a jquery based app, and trying to update list <li> item dynamically. 

 

When I add below code directly on index.html it displays well, but when I add dynalically on main.js, it doesn’t come up properly.

in index.html   

 <select id=”flip-3″ data-role=”slider”>
                  <option value=’nope’>Nope</option>
                  <option value=’yep’>Yep</option>
              </select>
  in main.js

“<li> <select  id=’flip-3′ data-role=’slider’> <option value=’nope’>Nope</option> <option value=’yep’>Yep</option></select></li>”

 

Please help me how can I make it look same as it looks in index,html. 

Also the list created is having very big list items, as I am adding a image as well of 35 px.

 

<li> <a href=”#”><img src=”chrome.png” height=”35″> hello</a>  </li> 

thanks.

Written by