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 - ScrollTo Effect (href to div) -

javascript - ng-class not responding to change in model in Angular? -

javascript - document.registerElement extending HTMLInputElement prototype while using custom tag name to avoid implicit browser style -