jQuery 缺少插件;声明前 (jQuery)

jQuery plugin missing ; before statement (jQuery)

我正在

SyntaxError: missing ; before statement }) (jQuery);

在下面的代码中。我正在尝试制作一个 jQuery 插件,但我看不出这里有什么问题:

(function($) {
$.fn.hideElement = function(options) {
  options = $.extend({}, $.fn.hideElement.defaults, options);

  return this.each(function(){
    var wrapping = $(this).css('white-space');
    $(this).css({'white-space':'nowrap'})
      .animate(options.toggling,1000, function(){
        $('<p>').text('»')
          .insertAfter($(this))
          .click(function(){
             $(this).prev()
             .animate(options.toggling,1000)
             .css({'white-space':wrapping})
             .next().remove();
      });
    });  
  });
  $.fn.hideElement.defaults = {
    'toggling':'width',
  }
}) (jQuery);

你的牙套不平衡所以不容易发现。

$.fn.hideElement = function(options) { 未关闭。

}) (jQuery);

之前再添加一个}