Drupal behaviour function not getting executed
Lol, it was a silly typo, Sorry. First it's behaviors not behaviours and then the namespace is jQuery not JQuery. Hard to find them on the IDE since it's valid javascript after all.