start to use Mootools for slider effects
This commit is contained in:
15
js/mootools-domready.js
Normal file
15
js/mootools-domready.js
Normal file
@@ -0,0 +1,15 @@
|
||||
window.addEvent('domready', function(){
|
||||
var divs = $$(['docs', 'js', 'html', 'css']);
|
||||
divs.each(function(div){
|
||||
var link = $(div.id + 'code');
|
||||
div.setStyle('display', 'none');
|
||||
link.addEvent('click', function(e){
|
||||
e = new Event(e);
|
||||
divs.each(function(other){
|
||||
if (other != div) other.setStyle('display', 'none');
|
||||
});
|
||||
div.setStyle('display', (div.getStyle('display') == 'block') ? 'none' : 'block');
|
||||
e.stop();
|
||||
});
|
||||
});
|
||||
});
|
Reference in New Issue
Block a user