Getting the error "$().once is not a function"
The standard $ alias is not used in Drupal 7, to provide the best possible support for no-conflict jQuery.

You need to wrap your code in a closure like so:

(function($) {
  // Add code using $ as an alias for jQuery here...
})(jQuery);


See Managing Javascript in Drupal 7 for complete examples and explanations.