Changeset 5842
- Timestamp:
- 09/09/08 17:06:37 (4 months ago)
- Files:
-
- 1 modified
-
trunk/plugins/cluetip/jquery.cluetip.js (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/plugins/cluetip/jquery.cluetip.js
r5810 r5842 122 122 tipTitle = tipParts.shift(); 123 123 } 124 var localContent ;124 var localContent, wrapped = false; 125 125 126 126 /*************************************** … … 250 250 } else if (opts.local){ 251 251 var $localContent = $(tipAttribute + ':first'); 252 var localCluetip = $.fn.wrapInner ? $localContent.wrapInner('<div></div>').children().clone(true) : $localContent.html(); 253 $.fn.wrapInner ? $cluetipInner.empty().append(localCluetip) : $cluetipInner.html(localCluetip); 252 if (typeof $.fn.wrapInner != 'undefined') { 253 if (wrapped === false) { 254 $localContent.wrapInner('<div></div>'); 255 } 256 wrapped = true; 257 var $localCluetip = $localContent.children().clone(true); 258 $cluetipInner.empty().append($localCluetip); 259 } else { 260 $cluetipInner.html($localContent.html()); 261 } 254 262 cluetipShow(pY); 255 263 } … … 260 268 $cluetip.addClass('cluetip-' + ctClass); 261 269 262 if (opts.truncate ) {270 if (opts.truncate && (+opts.truncate < $cluetipInner.text().length)) { 263 271 var $truncloaded = $cluetipInner.text().slice(0,opts.truncate) + '...'; 264 272 $cluetipInner.html($truncloaded); … … 332 340 } 333 341 opts.onShow($cluetip, $cluetipInner); 334 335 342 }; 336 343
