default theme and toggleComments javascript function

vincent3569 Member, Translator
hello

in image.php of the defaukt theme, there is a javascript function writing in the header :

[code]
<script type="text/javascript">
$(document).ready(function(){
$(".colorbox").colorbox({inline:true, href:"#imagemetadata"});
});
function toggleComments() {
var commentDiv = document.getElementById("comments");
if (commentDiv.style.display == "block") {
commentDiv.style.display = "none";
} else {
commentDiv.style.display = "block";
}
}
</script>
[/code]

what this function is suposed to do ?
on my site there is no effect on the comment section

Comments

  • There are two functions there. The first (colorbox) is for the showing of the "colorbox" window with image metadata.

    The second, toggleComments() was probably intended to show and hide the comments of the image. However, it seems never referenced, so it is probably redundant.
  • vincent3569 Member, Translator
    precisely, I would like to use this feature on my page image.php to show or hide comments.

    Can you explain how?
  • The simplest way would be to upgrade to tonight's build were there is a show/hide button option for the plugin. The code that was left over was (presumably) from a time in the past before the comment form plugin.
Sign In or Register to comment.