J. Shirley![]()
This is a simple plugin to provide transition-based close effects on div elements. Any element with a data-dismiss attribute can be quickly faded away into nothingness. It's typically used for Bootstrap alerts.
Following the Bootstrap alert code, you'll have a closer element. This plugin allows transition-based effects to close the alert.
Make sure to add the fade and in class for transition effects!
<div class="alert alert-error fade in">
<a class="close" data-dismiss="alert" href="#">&times;</a>
<p>This message can be closed!</p>
</div>
<script src="http://yui.yahooapis.com/3.6.0/build/yui/yui-min.js"></script>YUI({
//Last Gallery Build of this module
gallery: 'gallery-2012.08.22-20-00'
}).use('gallery-bootstrap-alert', function(Y) {
// To plug into a node:
Y.one(".alert").plug( Y.Plugin.Alert, options )
});
© 2006-2013 Yahoo! Inc. All rights reserved.
All code on this site is licensed under the BSD License unless stated otherwise.
About This Site · Security Contact Info