Hi Chen,
It seems I missed one important step that I didn't include in the readme. I'll update the file in the next couple of days, but for the moment you'll need to do the following:
In your theme's header.html file, within the <head> tags, include the following code:
<script>
$(document).ready(function(){
$("dd").hide();
$("dt a").click(function(){
if ($(this).parent().next().is(':visible')) {
$(this).parent().next().slideUp("slow");
}
else {
$("dd:visible").slideUp("slow");
$(this).parent().next().slideDown("slow");
}
return false;
});
});
</script>
This should enable the menu animations.
Let me know how you go.
Mark
Re: Front Page "Accordion" Course Menu worked in different way
由Mark Schumann發表於
Number of replies: 5
Hi Chen,
Yes that should be referenced as well just above the previous entry in the header.html file, sorry I missed that line myself. Use the code below to replace the code I gave you in my last reply:
<script src="<?php echo $CFG->themewww .'/'. current_theme() ?>/accordion_course_menu/jquery-1.2.6.min.js"></script>
<script>
$(document).ready(function(){
$("dd").hide();
$("dt a").click(function(){
if ($(this).parent().next().is(':visible')) {
$(this).parent().next().slideUp("slow");
}
else {
$("dd:visible").slideUp("slow");
$(this).parent().next().slideDown("slow");
}
return false;
});
});
</script>
Yes that should be referenced as well just above the previous entry in the header.html file, sorry I missed that line myself. Use the code below to replace the code I gave you in my last reply:
<script src="<?php echo $CFG->themewww .'/'. current_theme() ?>/accordion_course_menu/jquery-1.2.6.min.js"></script>
<script>
$(document).ready(function(){
$("dd").hide();
$("dt a").click(function(){
if ($(this).parent().next().is(':visible')) {
$(this).parent().next().slideUp("slow");
}
else {
$("dd:visible").slideUp("slow");
$(this).parent().next().slideDown("slow");
}
return false;
});
});
</script>
In reply to Mark Schumann
Re: Front Page "Accordion" Course Menu work well on FireFox
由Chen ZhongWei發表於
In reply to Chen ZhongWei
Re: Front Page "Accordion" Course Menu work well on FireFox
由Mark Schumann發表於