You select one element and then expect to get a property of another element. $('.value') selects the parent div of the one you want to select.
You should try this while preserving the specifics for the child $('.value') :
var data = $('.value .color-box.grey-silver-color-gradient').data("title"); console.log(data);
or any child whose data-title attribute has a value:
var data = $(".value [data-title!='']").data("title"); console.log(data);
jsfiddle: https://jsfiddle.net/o3ffptj3/1/
source share