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

python - mat is not a numerical tuple : openCV error -

c# - MSAA finds controls UI Automation doesn't -

wordpress - .htaccess: RewriteRule: bad flag delimiters -