jquery.random-fade-in
v1.3.3
Published
jQuery plugin to fade-in at random.
Downloads
6
Readme
jquery.random-fade-in
jQuery plugin to fade-in at random.
Demo
https://sutara79.github.io/jquery.random-fade-in/
Install
- GitHub: Clone or download.
- npm:
npm i jquery.random-fade-in
- CDN (jsDelivr):
- jquery.random-fade-in.min.js: v1.3.3
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
- jQuery: >=3.0.0 (because of XSS vulnerability)
- Browser: Chrome58, Firefox52, IE11, Edge14