Skip to content
This repository has been archived by the owner on Jun 14, 2020. It is now read-only.

Commit

Permalink
Updated metadata integration to include support for 2.1's HTML5 data-…
Browse files Browse the repository at this point in the history
…* attribute support.
  • Loading branch information
Craga89 committed Nov 23, 2010
1 parent 7c28181 commit 7146245
Show file tree
Hide file tree
Showing 5 changed files with 50 additions and 43 deletions.
2 changes: 1 addition & 1 deletion dist/jquery.qtip.css
Expand Up @@ -9,7 +9,7 @@
* http://en.wikipedia.org/wiki/MIT_License
* http://en.wikipedia.org/wiki/GNU_General_Public_License
*
* Date: Tue Nov 23 01:25:40 2010 +0000
* Date: Tue Nov 23 01:40:57 2010 +0000
*/

.ui-tooltip-accessible{
Expand Down
9 changes: 6 additions & 3 deletions dist/jquery.qtip.js
Expand Up @@ -9,7 +9,7 @@
* http://en.wikipedia.org/wiki/MIT_License
* http://en.wikipedia.org/wiki/GNU_General_Public_License
*
* Date: Tue Nov 23 01:25:40 2010 +0000
* Date: Tue Nov 23 01:40:57 2010 +0000
*/

"use strict"; // Enable ECMAScript "strict" operation for this function. See more: http://ejohn.org/blog/ecmascript-5-strict-mode-json-and-more/
Expand Down Expand Up @@ -1241,10 +1241,13 @@ function init(id, opts)
docBody = $(document.body),

// Grab metadata from element if plugin is present
metadata = (elem.metadata) ? sanitizeOptions(elem.metadata(opts.metadata)) : {},
metadata = (elem.metadata) ? elem.metadata(opts.metadata) : {},

// Check if the metadata returned is in HTML5 form and grab 'name' from the object instead
metadata5 = metadata && opts.metadata.type === 'html5' ? metadata[opts.metadata.name] : {},

// Create unique configuration object using metadata
config = $.extend(TRUE, {}, opts, metadata),
config = $.extend(TRUE, {}, opts, sanitizeOptions(metadata5 || metadata)),
posOptions = config.position,

// Use document body instead of document element if needed
Expand Down

0 comments on commit 7146245

Please sign in to comment.