Changeset 2437
- Timestamp:
- 07/21/07 02:49:01 (1 year ago)
- Location:
- trunk/plugins/cluetip
- Files:
-
- 4 modified
-
demo/alt-demo.html (modified) (2 diffs)
-
demo/index.html (modified) (2 diffs)
-
jquery.cluetip.css (modified) (1 diff)
-
jquery.cluetip.js (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/plugins/cluetip/demo/alt-demo.html
r2416 r2437 27 27 </ul> 28 28 <div id="container"> 29 30 <p>This is a demo page for the new clueTip — a jQuery-based, AJAX-powered tooltip developed by <a href="http://www.learningjquery.com/">Karl Swedberg</a>. The clueTip plug-in was inspired by <a href="http://www.codylindley.com">Cody Lindley</a>'s jTip script. Many feature ideas were provided by Shelane Enos. Glen Lipka and Jörn Zaefferer provided expert advice. <a href="http://www.tweaktheviking.com">Jonathan Chaffer</a> helped a lot, but eschewed the co-author designation out of sheer modesty. </p> 29 <p>This is a demo page for the new clueTip — a jQuery-based, AJAX-powered tooltip developed by <a href="http://www.learningjquery.com/">Karl Swedberg</a>. The clueTip plug-in was inspired by <a href="http://www.codylindley.com">Cody Lindley</a>'s jTip script. Many feature ideas were provided by Shelane Enos. <a href="http://commadot.com/">Glen Lipka</a> and <a href="http://bassistance.de/">Jörn Zaefferer</a> provided expert advice. <a href="http://www.tweaktheviking.com">Jonathan Chaffer</a> helped a lot, but eschewed the co-author designation out of sheer modesty. </p> 31 30 <p style="padding: .5em; border: 2px solid #ccc">This page uses the <a href="http://www.codylindley.com/blogstuff/js/jtip/">jTip</a> style for the clueTips. </p> 32 31 <div id="features"> … … 173 172 <li><del>Optimize ajax loading to avoid multiple requests for the same clueTip content.</del> Done!</li> 174 173 <li><del>Allow clueTips to take advantage of Brian Cherne's hoverIntent plugin</del> Done!</li> 175 <li><del>Include some kind of .png alpha transparency fix for IE 6 and under.</del> Done!</li>174 <li><del>Include some kind of .png alpha transparency fix for IE 6 and under.</del> Abandoned in favor of divs with reduced opacity </li> 176 175 </ul> 177 176 </div> -
trunk/plugins/cluetip/demo/index.html
r2416 r2437 28 28 <div id="container"> 29 29 30 <p>This is a demo page for the new clueTip — a jQuery-based, AJAX-powered tooltip developed by <a href="http://www.learningjquery.com/">Karl Swedberg</a>. The clueTip plug-in was inspired by <a href="http://www.codylindley.com">Cody Lindley</a>'s jTip script. Many feature ideas were provided by Shelane Enos and Glen Lipka. <a href="http://www.tweaktheviking.com">Jonathan Chaffer</a> helped a lot, but eschewed the co-author designation out of sheer modesty. </p>30 <p>This is a demo page for the new clueTip — a jQuery-based, AJAX-powered tooltip developed by <a href="http://www.learningjquery.com/">Karl Swedberg</a>. The clueTip plug-in was inspired by <a href="http://www.codylindley.com">Cody Lindley</a>'s jTip script. Many feature ideas were provided by Shelane Enos. <a href="http://commadot.com/">Glen Lipka</a> and <a href="http://bassistance.de/">Jörn Zaefferer</a> provided expert advice. <a href="http://www.tweaktheviking.com">Jonathan Chaffer</a> helped a lot, but eschewed the co-author designation out of sheer modesty. </p> 31 31 <div id="features"> 32 32 <h3>Features</h3> … … 163 163 <li><del>Optimize ajax loading to avoid multiple requests for the same clueTip content.</del> Done!</li> 164 164 <li><del>Allow clueTips to take advantage of Brian Cherne's hoverIntent plugin</del> Done!</li> 165 <li><del>Include some kind of .png alpha transparency fix for IE 6 and under.</del> Done!</li>165 <li><del>Include some kind of .png alpha transparency fix for IE 6 and under.</del> Abandoned in favor of divs with reduced opacity </li> 166 166 </ul> 167 167 </div> -
trunk/plugins/cluetip/jquery.cluetip.css
r2414 r2437 1 1 #cluetip { 2 z-index: 1001; 2 position: absolute; 3 /* z-index: 1001;*/ 4 background: #d9d9c2; 3 5 } 4 6 #cluetip-outer { -
trunk/plugins/cluetip/jquery.cluetip.js
r2416 r2437 100 100 closeText: 'Close', 101 101 truncate: 0, 102 fx: { 103 open: 'fadeIn', 104 openSpeed: 'fast', 105 close: 'hide', 106 closeSpeed: '' 107 }, 102 108 arrows: false, // CHANGE THIS TO true IF YOU WANT jTip-STYLE ARROWS FOR ALL clueTips 103 109 dropShadow: true, … … 130 136 $cluetip = $('<div></div>') 131 137 .attr({'id': 'cluetip'}) 138 .css({zIndex: 1002}) 132 139 .append($cluetipOuter) 133 140 .appendTo('body') … … 135 142 $('<img src="' + defaults.waitImage + '" />') 136 143 .attr({'id': 'cluetip-waitimage'}) 137 .css({position: 'absolute', zIndex: '1001'})144 .css({position: 'absolute', zIndex: 1001}) 138 145 .appendTo('body') 139 146 .hide(); 140 var cluezIndex = $cluetip.css('zIndex') != 'auto' ? $cluetip.css('zIndex') : '1002';147 var cluezIndex = $cluetip.css('zIndex') != 'auto' ? parseInt($cluetip.css('zIndex'), 10) : 1002; 141 148 $cluetip.css({position: 'absolute', zIndex: cluezIndex}); 142 149 $cluetipOuter.css({position: 'relative', zIndex: +cluezIndex+1}); … … 149 156 }; 150 157 $dropShadow.css({position: 'absolute', backgroundColor: '#000'}) 151 . appendTo($cluetip);158 .prependTo($cluetip); 152 159 } 160 153 161 var $this = $(this); 154 162 var tipAttribute = $this.attr(defaults.attribute); … … 176 184 var cluetipClose = function() { 177 185 $cluetipOuter 178 . children().empty().end()179 . parent().hide();186 .parent()[defaults.fx.close](defaults.fx.closeSpeed).end() 187 .children().empty(); 180 188 if (tipTitle) { 181 189 $this.attr('title', tipTitle); … … 224 232 $cluetip.css({backgroundPosition: bgPos}); 225 233 } 226 227 $cluetip. show();234 235 $cluetip.hide()[defaults.fx.open](defaults.fx.openSpeed); 228 236 }; 229 237 … … 270 278 $this.addClass(defaults.hoverClass); 271 279 } 272 273 sTop = $(document).scrollTop();274 offTop = $this.offset().top;275 offLeft = $this.offset().left;276 winWidth = $(window).width();277 posX = (offWidth > offLeft && offLeft > tipWidth)278 || offLeft + offWidth + tipWidth > winWidth279 ? offLeft - tipWidth - 15280 : offWidth + offLeft + 15;281 posY = offTop;282 280 if ($this[0].tagName.toLowerCase() != 'area') { 281 sTop = $(document).scrollTop(); 282 offTop = $this.offset().top; 283 offLeft = $this.offset().left; 284 winWidth = $(window).width(); 285 posX = (offWidth > offLeft && offLeft > tipWidth) 286 || offLeft + offWidth + tipWidth > winWidth 287 ? offLeft - tipWidth - 15 288 : offWidth + offLeft + 15; 289 posY = offTop; 290 } 283 291 $cluetip.css({width: defaults.width}); 292 284 293 if ($this.css('display') != 'block' && posX >=0 && $this[0].tagName.toLowerCase() != 'area') { 285 294 $cluetip.css({left: posX + 'px'});
