This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var data = [ | |
| { | |
| name: 'Nadav', | |
| school: 'Weber', | |
| interest: 'Jazz' | |
| }, | |
| { | |
| name: 'Noy', | |
| school: 'Epstein' | |
| }, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| jQuery.fn.toggleSingle = function (options) { | |
| // passing destruct: true allows | |
| var settings = $j.extend({ | |
| destruct: false | |
| }, options); | |
| return this.each(function () { | |
| if (!settings.destruct) { | |
| var $this = $j(this); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Generate an ID for the content if there isn't one | |
| if (!$next.attr('id')) { | |
| $next.attr('id', 'toggle-' + Math.random().toString(36).substr(2, 9)); | |
| } | |
| $this.attr('aria-controls', $next.attr('id')); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var $this = $j(this); | |
| var $next = $this.next(); | |
| $this.on('click', function () { | |
| $this.toggleClass('active') | |
| .attr('aria-expanded', !$this.attr('aria-expanded') === 'true'); | |
| $next().toggleClass('no-display') | |
| .attr('aria-hidden', !$next.attr('aria-hidden') === 'true'); | |
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $j(this).on('click', function () { | |
| $j(this) | |
| .toggleClass('active') | |
| .next() | |
| .toggleClass('no-display'); | |
| }); | |
| // Hide the content | |
| $j(this).next().addClass('no-display'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // ============================================== | |
| // UI Pattern - ToggleSingle | |
| // ============================================== | |
| // Use this plugin to toggle the visibility of content based on a toggle link/element. | |
| // This pattern differs from the accordion functionality in the Toggle pattern in that each toggle group acts | |
| // independently of the others. It is named so as not to be confused with the Toggle pattern below | |
| // | |
| // This plugin requires a specific markup structure. The plugin expects a set of elements that it | |
| // will use as the toggle link. It then hides all immediately-following siblings and toggles the sibling's |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (function() { | |
| var files = ['assets/site/css/non-critical.css', 'assets/site/img/icons.svg']; | |
| function getExtension(src) { | |
| return src.split('.').pop(); | |
| } | |
| function injectContent(content, type) { | |
| if (type === 'css') { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <script type="text/javascript"> | |
| (function () { | |
| "use strict"; | |
| // once cached, the css file is stored on the client forever unless | |
| // the URL below is changed. Any change will invalidate the cache | |
| var css_href = './index_files/web-fonts.css'; | |
| // a simple event handler wrapper | |
| function on(el, ev, callback) { | |
| if (el.addEventListener) { | |
| el.addEventListener(ev, callback, false); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <h1 class="em">Hi there <span>Dmitry</span></h1> | |
| <h1 class="rem">Hi there <span>Dmitry</span></h1> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Repudiandae neque harum, illo adipisci nulla accusamus quaerat, quas voluptatum voluptate ipsa. Deleniti dicta recusandae est a, expedita nostrum ducimus doloremque vero.</p> | |
| <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Repudiandae neque harum, illo adipisci nulla accusamus quaerat, quas voluptatum voluptate ipsa. Deleniti dicta recusandae est a, expedita nostrum ducimus doloremque vero.</p> | |
| <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Repudiandae neque harum, illo adipisci nulla accusamus quaerat, quas voluptatum voluptate ipsa. Deleniti dicta recusandae est a, expedita nostrum ducimus doloremque vero.</p> | |
| <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Repudiandae neque harum, illo adipisci nulla accusamus quaerat, quas voluptatum voluptate ipsa. Deleniti dicta recusandae est a, expedita nostrum ducimus doloremque vero.</p> |