jquery - Drop down Select with Images in Option in Backbone.js template -


i trying show images in dropdown options in backbone template. each option have image in it. have tried different ways of doing couldn't succeed. can let me know correct way of doing this.

here code trying:

         <div class="optionwrapper">             <select id="<%= id %>" class="extra_option">               <% _.each(options, function (opt) { %>                 <option value="1" <img src="<? echo $uploads;?>option_thumbnails/<%= opt.thumbnail_file %>">></option>                <% }); %>                                   </select>          </div> 

   <div class="optionwrapper">             <select id=<%= id %> class="extra_option">               <% _.each(options, function (opt) { %>                 <option value="1" <img src="<? echo $uploads;?>option_thumbnails/<%= opt.thumbnail_file %>>></option>                <% }); %>                                   </select>          </div> 

try without doublequote around template part (<%=id> , <%= opt.thumbnail_file %>)


Comments

Popular posts from this blog

javascript - How do I find how many occurences are there of a highlighted string, and which occurence is it? -

javascript - How to synchronize the Three.js and HTML/SVG coordinate systems (especially w.r.t. the y-axis)? -

java - Reading data from multiple zip files and combining them to one -