SyntaxFix
Write A Post
Hire A Developer
Questions
html:
<h4 data-toggle-selector="#me">toggle</h4> <div id="me">content here</div>
js:
$(function () { $('[data-toggle-selector]').on('click',function () { $($(this).data('toggle-selector')).toggle(300); }) })