jQuery Data Attribute not working on the most simplest demo possible...
$( document ).ready(function() {
$("#font_selection").change(function(){
var fontImgName = $(this).data('font-img');
//var fontImgName = $("#font_selection").data('font-img');
//var fontImgName = $(this).attr('data-font-img')
//var fontImgName = $("#font_selection").attr('data-font-img')
alert(fontImgName);
});
});
I must be missing something, I have tried every combination I can think of with no success, please help!
JSFiddle Demo here http://jsfiddle.net/8fvo3kw0/1/