Adding JavaScript just to one node
If you want to add the Javascript to a single node, you might also implement hook_node_view:

&lt;?php
function my_module_node_view($node, $viewmode, $langcode)
{
  if ($node-&gt;nid == MY_NODE_ID) {
    $node-&gt;content['#attached']['js'][] = array
    (
      'type' =&gt; 'file',
      'data' =&gt; drupal_get_path('module', 'my_module') . 'js/add_property.js',
    );
  }
}
?&gt;


(Solution adapted from https://www.drupal.org/node/1993228).