New jQuery function to jump after load directly to form first field
This commit is contained in:
parent
89bcb3d481
commit
f031b04ea4
1 changed files with 4 additions and 0 deletions
|
@ -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) {
|
||||
|
|
Reference in a new issue