currently i am calling a script something like this:
<script src="http://example.com/checkout.js" class="stripe-button"
data-description="Access for a year"
data-amount="5000">
</script>
is it possible to use the data attributes (data-description, data-amount, etc) using jQuery-getScript?
i would like to do something like this:
jQuery.getScript('http://example.com/checkout.js',
{ data-description:"Year Access", /*this is just a guess*/
data-amount:"5000" }, /*but probably wont work*/
function( data, textStatus, jqxhr ) {
});
i realize that getScript is shorthand ajax, but i cannot determine where the data-attributes might be included.
down-voters: i honestly did try to research this but could not find any examples.