A want to create a pure JavaScript plugin. Is it possible to set options in HTML file like if I set options for jQuery? If yes, how?
Example options in jQuery:
$(document).ready(function(){
$("#myID").myFunction({
folded: true,
defaultSlide: 1
});
});
You can set extra attributes to the specified HTML element and just read them when you need:
And in JavaScript: