Changeset 5810
- Timestamp:
- 08/07/08 17:11:53 (4 months ago)
- Files:
-
- 1 modified
-
trunk/plugins/cluetip/jquery.cluetip.js (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/plugins/cluetip/jquery.cluetip.js
r5771 r5810 89 89 $cluetipArrows = $('<div id="cluetip-arrows" class="cluetip-arrows"></div>').css({zIndex: cluezIndex+1}).appendTo('#cluetip'); 90 90 } 91 var dropShadowSteps = (opts.dropShadow)? +opts.dropShadowSteps : 0;91 var dropShadowSteps = opts.dropShadow ? +opts.dropShadowSteps : 0; 92 92 if (!$dropShadow) { 93 93 $dropShadow = $([]); 94 94 for (var i=0; i < dropShadowSteps; i++) { 95 95 $dropShadow = $dropShadow.add($('<div></div>').css({zIndex: cluezIndex-i-1, opacity:.1, top: 1+i, left: 1+i})); 96 } ;97 $dropShadow.css({position: 'absolute', backgroundColor: '#000'})96 } 97 $dropShadow.css({position: 'absolute', backgroundColor: opts.dropShadowColor}) 98 98 .prependTo($cluetip); 99 99 } 100 100 var tipAttribute = $this.attr(opts.attribute), ctClass = opts.cluetipClass; 101 if (!tipAttribute && !opts.splitTitle && !js) return true;101 if (!tipAttribute && !opts.splitTitle && !js) {return true;} 102 102 // if hideLocal is set to true, on DOM ready hide the local content that will be displayed in the clueTip 103 103 if (opts.local && opts.localPrefix) {tipAttribute = opts.localPrefix + tipAttribute;} … … 110 110 // horizontal measurement variables 111 111 var tipInnerWidth = isNaN(parseInt(opts.width, 10)) ? 275 : parseInt(opts.width, 10); 112 var tipWidth = tipInnerWidth + (parseInt($cluetip.css('paddingLeft') )||0) + (parseInt($cluetip.css('paddingRight'))||0) + dropShadowSteps;112 var tipWidth = tipInnerWidth + (parseInt($cluetip.css('paddingLeft'),10)||0) + (parseInt($cluetip.css('paddingRight'),10)||0) + dropShadowSteps; 113 113 var linkWidth = this.offsetWidth; 114 114 var linkLeft, posX, tipX, mouseX, winWidth; … … 188 188 var tpl = tipParts.length; 189 189 for (var i=0; i < tpl; i++){ 190 if (i == 0) {190 if (i === 0) { 191 191 $cluetipInner.html(tipParts[i]); 192 192 } else { 193 193 $cluetipInner.append('<div class="split-body">' + tipParts[i] + '</div>'); 194 194 } 195 } ;195 } 196 196 cluetipShow(pY); 197 197 } … … 200 200 ***************************************/ 201 201 202 else if (!opts.local && tipAttribute.indexOf('#') != 0) {202 else if (!opts.local && tipAttribute.indexOf('#') !== 0) { 203 203 if (cluetipContents && opts.ajaxCache) { 204 204 $cluetipInner.html(cluetipContents); … … 239 239 } else { 240 240 $('#cluetip-waitimage').hide(); 241 if (isActive) cluetipShow(pY);241 if (isActive) {cluetipShow(pY);} 242 242 } 243 243 }; … … 466 466 arrows: false, // if true, displays arrow on appropriate side of clueTip 467 467 dropShadow: true, // set to false if you don't want the drop-shadow effect on the clueTip 468 dropShadowColor: '#000', 468 469 dropShadowSteps: 6, // adjusts the size of the drop shadow 469 470 sticky: false, // keep visible until manually closed
