jsExample

clickme   

You also have the option of adding a javascript file when you are creating and editing components. At the moment Atomic Docs expects the directory that your javascript files are located to be named "js". As is the case with the Scss files you will need to configure your build tool to compile the partial js files.

Click me!!!
Copy
Edit
<!-- components/jsExample/clickme.php --> <span class="click">Click me!!!</span>
Copy
Copy
Edit
/* scss/jsExample/_clickme.scss */ .click{ cursor: pointer; position: relative; left: 0; transition: left .25s; background: #ccf9bf; padding: 20px 40px; display: inline-block; } .clickAnimate{ left: 80%; }
Copy
Edit
/* js/clickme.js */ $('.click').click(function () { $(this).toggleClass('clickAnimate'); });