New jQuery function to jump after load directly to form first field

This commit is contained in:
Manuel Cillero 2017-07-26 11:45:46 +02:00
parent 89bcb3d481
commit f031b04ea4

View file

@ -90,6 +90,10 @@ function nodecomment_form_alter(&$form, &$form_state, $form_id) {
'#value' => 1 '#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) { function _nodecomment_alter_nodecomment_form(&$form, $node, $target_node = NULL, $target_comment = NULL) {