diff --git a/modules/nodecomment/includes/nodecomment.forms.inc b/modules/nodecomment/includes/nodecomment.forms.inc index d55563c..106f72d 100644 --- a/modules/nodecomment/includes/nodecomment.forms.inc +++ b/modules/nodecomment/includes/nodecomment.forms.inc @@ -90,6 +90,10 @@ function nodecomment_form_alter(&$form, &$form_state, $form_id) { '#value' => 1 ); } + + if (in_array($type, nodecomment_get_comment_types())) { + drupal_add_js('$jq(\'html\').delay(100).animate({scrollTop:$("#node-form").offset().top},2400);', 'inline', 'footer'); + } } function _nodecomment_alter_nodecomment_form(&$form, $node, $target_node = NULL, $target_comment = NULL) {