I am trying to get a parameter of a function from a data attribute, like there is a function which accept parameters:
$(element).transition({
x:'100%',
opacity: '0.5'
});
and I wan to get transition parameters from a data attribute, like:
<div class="have-data" data-transition="x:'100%',opacity: '0.5'">
....
</div>
Now i want to get parameters from data attribute and set it .transition() parameter to like:
.transition($('.have-data').data('transition'))