Front Page "Accordion" Course Menu (video inside)

Re: Front Page "Accordion" Course Menu worked in different way

از Mark Schumann در
Number of replies: 5
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
In reply to Mark Schumann

Re: Front Page "Accordion" Course Menu still not work

از Chen ZhongWei در
Hi, Mark,
I modified the code as you suggested, but it didn't work yet. I checked code in accordion_course_menu files and found that the file " jquery-1.2.6.min.js " is not referenced anywhere.Is that the problem?
Thanks.

Chen
In reply to Chen ZhongWei

Re: Front Page "Accordion" Course Menu still not work

از Mark Schumann در
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>


In reply to Mark Schumann

Re: Front Page "Accordion" Course Menu work well on FireFox

از Chen ZhongWei در

Thanks Mark,

    It works well on FireFox now. Good idea.Thanks.

    One more issue on IE7.0: course items are seperated with a blank block as high as the course item, where  should be a white line only.

 Chen 

In reply to Chen ZhongWei

Re: Front Page "Accordion" Course Menu work well on FireFox

از Mark Schumann در
That's interesting because it seems to look fine on my IE7. I haven't checked IE6 yet, so there may be issues there. I'll look into it.

I've also updated the archive to include all the latest instructions.

Mark