Dropkick dropdown display image associated with default select value -
i'm passing default value dropdown on page load following code not display image associated selected value on load. if choose value dropdown after page loads, associated image displays intended. how image display when default value passed initially? ideas?
$(document).ready(function(){ $('form .primary_choices').dropkick({ change: function (value, label){ $('#firstchoice').html(<image src=@imagepath' + '/' + label.replace(' ', '_').replace(' ', '_') + '.jpg" />'); } }); });
Comments
Post a Comment