advanced regex uses from Secrets of the JavaScript Ninja
A Pen by Andrew Kirchmyer on CodePen.
| <div class="tools"> | |
| <strong>LOGO: </strong> | |
| <ul class="logos"> | |
| <li><a href="#" data-logo-url="http://acetutor.dev:8080/wp-content/themes/acetutor/dist/images/bulldog.png">Logo 1</a></li> | |
| <li><a href="#" data-logo-url="http://acetutor.dev:8080/wp-content/themes/acetutor/dist/images/cathorizontal.png">Logo 2</a></li> | |
| <li><a href="#" data-logo-url="http://acetutor.dev:8080/wp-content/themes/acetutor/dist/images/catvertical.png">Logo 3</a></li> | |
| <li><a href="#" data-logo-url="http://acetutor.dev:8080/wp-content/themes/acetutor/dist/images/cathat.png">Logo 4</a></li> | |
| <li><a href="#" data-logo-url="http://acetutor.dev:8080/wp-content/themes/acetutor/dist/images/bulldog2.png">Logo 5</a></li> | |
| </ul> | |
| <strong>COLORS:</strong> |
| function logActive() { | |
| let active = document.activeElement; | |
| return setInterval(() => { | |
| if (active !== document.activeElement) { | |
| active = document.activeElement; | |
| console.log('New active element:', active); | |
| } | |
| }, 400); | |
| } | |
| logActive(); |
| var app = { | |
| model: {} | |
| }; | |
| /** | |
| * Get an attribute from the model. | |
| * fetch() will make an async call for data from some api and call 'callback' on completion. | |
| * 'callback' will resolve the returned promise with the fetched attribute value. | |
| */ | |
| app.model.getAttributeLater = function (attribute) { | |
| var dfd = $.Deferred(); |
advanced regex uses from Secrets of the JavaScript Ninja
A Pen by Andrew Kirchmyer on CodePen.
A Pen by Andrew Kirchmyer on CodePen.
A Pen by Andrew Kirchmyer on CodePen.
A Pen by Andrew Kirchmyer on CodePen.
| <a href="http://synacor.com" id="link1">New Window</a> | |
| <a href="http://synacor.com" id="link2">Same Window</a> | |
| <a href="http://synacor.com" id="link3">Location Info</a> | |
| <div id="results"></div> |
| <div class="rises"> </div> | |
| <div class="fades"> <div class="label">Hover me!</div> </div> | |
| <div class="other"> </div> |