Bug Tracker

Changeset 5667

Show
Ignore:
Timestamp:
05/22/08 18:05:42 (8 months ago)
Author:
kswedberg
Message:

clueTip plugin: fixed problem with metadata plugin compatibility; fixed problem with non-iterating nested options by using recursive extend

Location:
trunk/plugins/cluetip
Files:
1 added
2 removed
2 modified

Legend:

Unmodified
Added
Removed
  • trunk/plugins/cluetip/demo/index.html

    r5557 r5667  
    77  <title>clueTip : A jQuery Plugin</title> 
    88 
    9   <script src="../jquery-1.2.3.min.js" type="text/javascript"></script> 
    10   <script src="../jquery.dimensions-1.2.js" type="text/javascript"></script> 
     9  <script src="../jquery-1.2.5.min.js" type="text/javascript"></script> 
    1110  <script src="../jquery.hoverIntent.js" type="text/javascript"></script> 
    1211  <script src="../jquery.cluetip.js" type="text/javascript"></script> 
  • trunk/plugins/cluetip/jquery.cluetip.js

    r5640 r5667  
    11/* 
    22 * jQuery clueTip plugin 
    3  * Version 0.9.7  (05/11/2008) 
    4  * @requires jQuery v1.1.1+ 
    5  * @requires Dimensions plugin  
     3 * Version 0.9.8  (05/22/2008) 
     4 * @requires jQuery v1.1.4+ 
     5 * @requires Dimensions plugin (for jQuery versions < 1.2.5) 
    66 * 
    77 * Dual licensed under the MIT and GPL licenses: 
     
    6666    } 
    6767    return this.each(function(index) { 
     68      var $this = $(this);       
     69       
    6870      // support metadata plugin (v1.0 and 2.0) 
    69       var opts = $.extend({}, $.fn.cluetip.defaults, options || {}, $.metadata ? $cont.metadata() : $.meta ? $cont.data() : {}); 
    70  
    71       if (options && options.ajaxSettings) { 
    72         $.extend(opts.ajaxSettings, options.ajaxSettings); 
    73         delete options.ajaxSettings; 
    74       } 
    75  
    76       if (options && options.hoverIntent) { 
    77         $.extend(opts.hoverIntent, options.hoverIntent); 
    78         delete options.hoverIntent; 
    79       }     
    80  
    81       if (options && options.fx) { 
    82         $.extend(opts.fx, options.fx); 
    83         delete options.fx; 
    84       } 
     71      var opts = $.extend(false, {}, $.fn.cluetip.defaults, options || {}, $.metadata ? $this.metadata() : $.meta ? $this.data() : {}); 
     72 
    8573      // start out with no contents (for ajax activation) 
    8674      var cluetipContents = false; 
     
    11098        .prependTo($cluetip); 
    11199      } 
    112       var $this = $(this);       
    113100      var tipAttribute = $this.attr(opts.attribute), ctClass = opts.cluetipClass; 
    114101      if (!tipAttribute && !opts.splitTitle && !js) return true;