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
Post a Comment