2 * jQuery UI ImageMap 1.0.0 beta
4 * Copyright 2011, Călin-Andrei Burloiu
5 * Dual licensed under the MIT or GPL Version 2 licenses.
6 * http://jquery.org/license
12 (function( $, undefined ) {
14 $.widget( "ui.imagemap", {
15 version: "1.0.0 beta",
23 $('div.ui-imagemap-image', widget.element)
24 .css('position', 'relative')
25 .css('width', $('div.ui-imagemap-image > img', widget.element).css('width'))
26 .css('height', $('div.ui-imagemap-image > img', widget.element).css('height'))
29 widget.$marker = $('<div></div>')
30 .appendTo('div.ui-imagemap-image', widget.element);
32 .css('position', 'absolute')
33 .css('outline', '2px solid red')
34 .css('background', 'transparent');
36 $('.ui-imagemap-title', widget.element)
40 if (typeof $title.data('top') == 'undefined')
42 if (typeof $title.data('left') == 'undefined')
45 var top = $title.data('top')
46 var left = $title.data('left');
49 if (typeof $title.data('width') == 'undefined')
52 width = $title.data('width');
53 if (typeof $title.data('height') == 'undefined')
56 height = $title.data('height');
62 .css('height', height);
67 _destroy: function() {
68 this.element.html('');
71 _setOption: function( key, value ) {
73 if ( key === "TODO" ) {
77 this._super( "_setOption", key, value );