Skip to content

sutara79/jquery.random-fade-in

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

jquery.random-fade-in

npm version Build Status

jQuery plugin to fade-in at random.

Sample image

Demo

https://sutara79.github.io/jquery.random-fade-in/

Install

Usage

HTML
<div class="box-container">
  <div><!-- Wrapper (Required) -->
    <p>foo</p><!-- Target to fade-in -->
  </div>
  <div>
    <p>bar</p>
  </div>
  <div>
    <p>baz</p>
  </div>
</div>

<script src="https://code.jquery.com/jquery-3.2.1.min.js"></script>
<script src="jquery.random-fade-in.min.js"></script>
CSS
.box-container div p {
  display: none; /* Required */
}
JavaScript
$('.box-container').randomFadeIn();

Option

name type default description
1st arg string, number 'slow' Duration. Same to jQuery ".fadeIn()".
2nd arg boolean true Whether to repeat.

Compatibility

License

MIT

Author

Yuusaku Miyazaki ( toumin.m7@gmail.com )