Plugins stops working wehn upgrading from JQuery 1.8.3 to JQuery 1.9.1. Could someone, please, help me out?

Plugins stops working wehn upgrading from JQuery 1.8.3 to JQuery 1.9.1. Could someone, please, help me out?

Hello,

Some time ago I created a Balloon plugin using JQuery 1.8.3.

When I updated from JQuery 1.8.3 to JQuery 1.9.1 my plugin stoped working.

The balloons do not show anymore. I went back to 1.8.3 and it works.

I tried to understand what might be wrong but I can't find it.

Could someone, please, help me out? This is my code:

  1.     (function ($) {
  2.       $.fn.Balloon = function (options) {
  3.     var defaults = {
  4.           balloon: "",
  5.           class: "Balloon",
  6.           click: false,
  7.           id: "Balloon",
  8.           sensible: false,
  9.           x: -4,
  10.           y: -40
  11.         };
  12.         var options = $.extend({}, defaults, options);
  13.         var balloon;
  14.         $(this).each(function () {
  15.           var title = $(this).attr("title");
  16.           if (title == undefined) return;
  17.           $(this).hover(function (e) {
  18.             $(this).removeAttr("title")
  19.             balloon = "<div id='{id}' class='{class}'><span class='Text'>{content}</span><span class='Background'></span></div>"
  20.             if (options.balloon == "") {
  21.               balloon = balloon.replace("{class}", options.class).replace("{id}", options.id).replace("{content}", title);
  22.             } else {
  23.               balloon = balloon.replace("{class}", options.class).replace("{id}", options.id).replace("{content}", options.balloon).replace("{title}", title);
  24.             }
  25.             $("body").append(balloon);
  26.             $("#" + options.id).fadeIn("fast");
  27.           },
  28.           function () {
  29.             $("#" + options.id).remove();
  30.             $(this).attr("title", title);
  31.           });
  32.           $(this).mousedown(function (e) {
  33.             if (options.click) {
  34.               $("#" + options.id).remove();
  35.               $(this).attr("title", title);
  36.             }
  37.           }),
  38.           $(this).mousemove(function (e) {
  39.             var x = e.pageX + options.x;
  40.             var y = e.pageY + options.y;
  41.             if (options.sensible) {
  42.               var width = $("#" + options.id).width();
  43.               var height = $("#" + options.id).height();
  44.               var right = $(window).width() - (x + width);
  45.               var bottom = $(window).height() - (y + height);
  46.               if (right < 20) {
  47.                 x = e.pageX - width - options.x;
  48.               }
  49.               if (bottom < 20) {
  50.                 y = e.pageY - height - options.y;
  51.               }
  52.             }
  53.             $("#" + options.id).css({ top: y, left: x });
  54.           }); // Mouse Move
  55.         }); // Balloon
  56.       };
  57.     })(jQuery);
Thank You,
Miguel