I'd like to write a simple jQuery plugin that displays inline modals under specified elements. My idea is for the script to auto-init based on data attributes specified on elements.
A very basic example:
<p data-modal-target>Hover over me for an inline modal!</p>
<div data-modal-content data-modal-align="right" data-modal-trigger="hover" data-modal-offset="10px"><!-- any desired syntax can go here --></div>
I'm just wondering if data-modal-target
in the above example is valid, or does it have to be data-modal-target="true"
? I don't care about anything crappier than IE9 etc, my only requirement is that it be valid HTML.