Reputation: 1
For example:
<div id="target" data-width="400px"></div>
$("#target").myPlugin({width: ??? });
??? must be data-width
attribute value.
Upvotes: 0
Views: 47
Reputation: 57312
you can do this by
$("#target").myPlugin({
width: $("#target").data('width')
});
all credit goes to adeneo
Upvotes: 1