This is an example of the native dialog functionality
http://thenewcode.com/957/Native-Modal-Windows-in-HTML5-Using-the-dialog-Element http://thenewcode.com/962/A-Modern-HTML5-Lightbox-in-12-Lines-of-JavaScript
A Pen by neutraltone on CodePen.
| lastIndex = 0; // Just the first time. Could be a random number too. | |
| setInterval(function(){ | |
| lastIndex = dnr(lastIndex, 10); // 10 being the max. | |
| console.log(lastIndex); | |
| }, 1000); // Every 1 sec. | |
| // Do not repeat. Never gives the same number twice. | |
| function dnr(lastIndex, length){ | |
| var randIndex = Math.floor((Math.random()*length)); |
| <?php | |
| $image_counts = array(1,5,8,4,3,6,2,6,6,5,10); | |
| $possible = array(1,2,4); | |
| $total_counts = array(); | |
| foreach ($image_counts as $imgcount) { | |
| $done = false; | |
| $totals = array(); | |
| $total = 0; |
| function equalCols() { | |
| $('.js-cols').each(function() { | |
| var tallestCol = 0; | |
| currentHeight; | |
| $(this).find('.js-col').each(function() { | |
| $(this).css('height', 'auto'); | |
| currentHeight = $(this).height('auto').height(); | |
| if (currentHeight > tallestCol) { | |
| tallestCol = currentHeight; | |
| } |
| ul > li { | |
| visibility:hidden; | |
| opacity:0; | |
| transition:visibility 0s linear 0.5s,opacity 0.5s linear; | |
| } | |
| ul:hover > li { | |
| visibility:visible; | |
| opacity:1; | |
| transition-delay:0s; |
This is an example of the native dialog functionality
http://thenewcode.com/957/Native-Modal-Windows-in-HTML5-Using-the-dialog-Element http://thenewcode.com/962/A-Modern-HTML5-Lightbox-in-12-Lines-of-JavaScript
A Pen by neutraltone on CodePen.
| %icon { | |
| content: ''; | |
| display: block; | |
| &--open { | |
| @extend %icon; | |
| background-image: url('../img/plus.svg'); | |
| } | |
| &--close { |
| //------------------------------------*\ | |
| // $BASE-DEFAULTS | |
| //------------------------------------*/ | |
| :root { | |
| font: 400 #{($base-font-size/16px)*1em}/#{$base-line-height/$base-font-size} $base-font-family; | |
| } |
| /** | |
| * Gulp Packages | |
| * ============= | |
| * Import our gulp packages. | |
| */ | |
| import gulp from 'gulp'; | |
| import svgmin from 'gulp-svgmin'; | |
| import svgstore from 'gulp-svgstore'; | |
| import cheerio from 'gulp-cheerio'; |
| <div class="header header--sticky"> | |
| <div class="header__container header__container--active"> | |
| <nav>navigation</nav> | |
| </div> | |
| </div> |