hello
i 'd like to add a FX.slider mootools to my ascx page of a Dot net nuke module.
but i have a problem: the domevent is not raised up!
this is my code:
<script language="javascript" type="text/javascript" src="/DesktopModules/testmoto/js/demo.js"></script>
<script type="text/javascript" language="javascript">
window.addEvent('domready', function() {
he dom is ready');
//-vertical
var myVerticalSlide = new Fx.Slide('vertical_slide');
$('v_slidein').addEvent('click', function(e){
e.stop();
myVerticalSlide.slideIn();
});
$('v_slideout').addEvent('click', function(e){
e.stop();
myVerticalSlide.slideOut();
});
$('v_toggle').addEvent('click', function(e){
e.stop();
myVerticalSlide.toggle();
});
$('v_hide').addEvent('click', function(e){
e.stop();
myVerticalSlide.hide();
$('vertical_status').set('html', status[myVerticalSlide.open]);
});
$('v_show').addEvent('click', function(e){
e.stop();
myVerticalSlide.show();
$('vertical_status').set('html', status[myVerticalSlide.open]);
});
// When Vertical Slide ends its transition, we check for its status
// note that complete will not affect 'hide' and 'show' methods
myVerticalSlide.addEvent('complete', function() {
$('vertical_status').set('html', status[myVerticalSlide.open]);
});
//--horizontal
var myHorizontalSlide = new Fx.Slide('horizontal_slide', {mode: 'horizontal'});
$('h_slidein').addEvent('click', function(e){
e.stop();
myHorizontalSlide.slideIn();
});
$('h_slideout').addEvent('click', function(e){
e.stop();
myHorizontalSlide.slideOut();
});
$('h_toggle').addEvent('click', function(e){
e.stop();
myHorizontalSlide.toggle();
});
$('h_hide').addEvent('click', function(e){
e.stop();
myHorizontalSlide.hide();
$('horizontal_status').set('html', status[myHorizontalSlide.open]);
});
$('h_show').addEvent('click', function(e){
e.stop();
myHorizontalSlide.show();
$('horizontal_status').set('html', status[myHorizontalSlide.open]);
});
// When Horizontal Slide ends its transition, we check for its status
// note that complete will not affect 'hide' and 'show' methods
myHorizontalSlide.addEvent('complete', function() {
$('horizontal_status').set('html', status[myHorizontalSlide.open]);
});
});
</script>
<h1>Fx.Slide</h1>
<h2>Introduction</h2>
<p>
Here goes a nice introduction
</p>
<h3 class="section">Vertical</h3>
<div class="marginbottom">
slide out
|
slide in
|
toggle
|
hide
|
show
| <strong>status</strong>: open
</div>
<div id="vertical_slide">
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
</div>
<h3 class="section">Horizontal</h3>
<div class="marginbottom">s
slide out
|
slide in
|
toggle
|
hide
|
show
| <strong>status</strong>: open
</div>
<div id="horizontal_slide">
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
</div>
no alert is seen!
i tried to put the javascript at the end of my page but nothing happened!
where is my problem?
tnx!!
Karmo