├── demo ├── includes │ ├── bullet.png │ ├── sheet_bg.jpg │ ├── demos.js │ ├── demos.css │ ├── sh_main.min.js │ └── jquery-1.4.2.min.js └── demo.html ├── README.txt ├── src ├── tip-violet │ ├── tip-violet.png │ ├── tip-violet_arrows.png │ └── tip-violet.css ├── tip-yellow │ ├── tip-yellow.png │ ├── tip-yellow_arrows.png │ └── tip-yellow.css ├── tip-darkgray │ ├── tip-darkgray.png │ ├── tip-darkgray_arrows.png │ └── tip-darkgray.css ├── tip-skyblue │ ├── tip-skyblue.png │ ├── tip-skyblue_arrows.png │ └── tip-skyblue.css ├── tip-green │ ├── tip-green_arrows.gif │ └── tip-green.css ├── tip-twitter │ ├── tip-twitter_arrows.gif │ └── tip-twitter.css ├── tip-yellowsimple │ ├── tip-yellowsimple_arrows.gif │ └── tip-yellowsimple.css ├── jquery.poshytip.min.js └── jquery.poshytip.js ├── MIT-LICENSE.txt └── GPL-LICENSE.txt /demo/includes/bullet.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vadikom/poshytip/HEAD/demo/includes/bullet.png -------------------------------------------------------------------------------- /demo/includes/sheet_bg.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vadikom/poshytip/HEAD/demo/includes/sheet_bg.jpg -------------------------------------------------------------------------------- /README.txt: -------------------------------------------------------------------------------- 1 | Home page with introduction: 2 | http://vadikom.com/tools/poshy-tip-jquery-plugin-for-stylish-tooltips/ -------------------------------------------------------------------------------- /src/tip-violet/tip-violet.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vadikom/poshytip/HEAD/src/tip-violet/tip-violet.png -------------------------------------------------------------------------------- /src/tip-yellow/tip-yellow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vadikom/poshytip/HEAD/src/tip-yellow/tip-yellow.png -------------------------------------------------------------------------------- /src/tip-darkgray/tip-darkgray.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vadikom/poshytip/HEAD/src/tip-darkgray/tip-darkgray.png -------------------------------------------------------------------------------- /src/tip-skyblue/tip-skyblue.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vadikom/poshytip/HEAD/src/tip-skyblue/tip-skyblue.png -------------------------------------------------------------------------------- /src/tip-green/tip-green_arrows.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vadikom/poshytip/HEAD/src/tip-green/tip-green_arrows.gif -------------------------------------------------------------------------------- /src/tip-skyblue/tip-skyblue_arrows.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vadikom/poshytip/HEAD/src/tip-skyblue/tip-skyblue_arrows.png -------------------------------------------------------------------------------- /src/tip-twitter/tip-twitter_arrows.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vadikom/poshytip/HEAD/src/tip-twitter/tip-twitter_arrows.gif -------------------------------------------------------------------------------- /src/tip-violet/tip-violet_arrows.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vadikom/poshytip/HEAD/src/tip-violet/tip-violet_arrows.png -------------------------------------------------------------------------------- /src/tip-yellow/tip-yellow_arrows.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vadikom/poshytip/HEAD/src/tip-yellow/tip-yellow_arrows.png -------------------------------------------------------------------------------- /src/tip-darkgray/tip-darkgray_arrows.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vadikom/poshytip/HEAD/src/tip-darkgray/tip-darkgray_arrows.png -------------------------------------------------------------------------------- /src/tip-yellowsimple/tip-yellowsimple_arrows.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vadikom/poshytip/HEAD/src/tip-yellowsimple/tip-yellowsimple_arrows.gif -------------------------------------------------------------------------------- /MIT-LICENSE.txt: -------------------------------------------------------------------------------- 1 | Copyright (c) 2010 Vasil Dinkov, http://vadikom.com/ 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining 4 | a copy of this software and associated documentation files (the 5 | "Software"), to deal in the Software without restriction, including 6 | without limitation the rights to use, copy, modify, merge, publish, 7 | distribute, sublicense, and/or sell copies of the Software, and to 8 | permit persons to whom the Software is furnished to do so, subject to 9 | the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be 12 | included in all copies or substantial portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 15 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 16 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 17 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 18 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 19 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 20 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | -------------------------------------------------------------------------------- /src/tip-green/tip-green.css: -------------------------------------------------------------------------------- 1 | .tip-green { 2 | z-index:1000; 3 | text-align:left; 4 | border:1px solid #bdde98; 5 | padding:7px 10px; 6 | min-width:50px; 7 | max-width:300px; 8 | color:#860404; 9 | background-color:#dff6c6; 10 | /** 11 | * - If you set a background-image, border/padding/background-color will be ingnored. 12 | * You can set any padding to .tip-inner instead if you need. 13 | * - If you want a tiled background-image and border/padding for the tip, 14 | * set the background-image to .tip-inner instead. 15 | */ 16 | } 17 | .tip-green .tip-inner { 18 | font:bold 12px/14px arial,helvetica,sans-serif; 19 | } 20 | 21 | /* Configure an arrow image - the script will automatically position it on the correct side of the tip */ 22 | .tip-green .tip-arrow-top { 23 | margin-top:-10px; 24 | margin-left:6px; 25 | top:0; 26 | left:0; 27 | width:10px; 28 | height:10px; 29 | background:url(tip-green_arrows.gif) no-repeat; 30 | } 31 | .tip-green .tip-arrow-right { 32 | margin-top:6px; 33 | margin-left:0; 34 | top:0; 35 | left:100%; 36 | width:10px; 37 | height:10px; 38 | background:url(tip-green_arrows.gif) no-repeat -10px 0; 39 | } 40 | .tip-green .tip-arrow-bottom { 41 | margin-top:0; 42 | margin-left:6px; 43 | top:100%; 44 | left:0; 45 | width:10px; 46 | height:10px; 47 | background:url(tip-green_arrows.gif) no-repeat -20px 0; 48 | } 49 | .tip-green .tip-arrow-left { 50 | margin-top:6px; 51 | margin-left:-10px; 52 | top:0; 53 | left:0; 54 | width:10px; 55 | height:10px; 56 | background:url(tip-green_arrows.gif) no-repeat -30px 0; 57 | } -------------------------------------------------------------------------------- /src/tip-skyblue/tip-skyblue.css: -------------------------------------------------------------------------------- 1 | .tip-skyblue { 2 | z-index:1000; 3 | text-align:left; 4 | padding:8px 10px; 5 | min-width:50px; 6 | max-width:300px; 7 | color:#37356c; 8 | background-color:#b9f3f8; 9 | background-image:url(tip-skyblue.png); /* bgImageFrameSize == 9 works fine */ 10 | /** 11 | * - If you set a background-image, border/padding/background-color will be ingnored. 12 | * You can set any padding to .tip-inner instead if you need. 13 | * - If you want a tiled background-image and border/padding for the tip, 14 | * set the background-image to .tip-inner instead. 15 | */ 16 | } 17 | .tip-skyblue .tip-inner { 18 | font:bold 13px/15px 'trebuchet ms',arial,helvetica,sans-serif; 19 | padding:0 3px 1px 3px; 20 | } 21 | 22 | /* Configure an arrow image - the script will automatically position it on the correct side of the tip */ 23 | .tip-skyblue .tip-arrow-top { 24 | margin-top:-12px; 25 | margin-left:0; 26 | top:0; 27 | left:0; 28 | width:11px; 29 | height:19px; 30 | background:url(tip-skyblue_arrows.png) no-repeat; 31 | } 32 | .tip-skyblue .tip-arrow-right { 33 | margin-top:0; 34 | margin-left:-7px; 35 | top:0; 36 | left:100%; 37 | width:18px; 38 | height:13px; 39 | background:url(tip-skyblue_arrows.png) no-repeat -20px 0; 40 | } 41 | .tip-skyblue .tip-arrow-bottom { 42 | margin-top:-8px; 43 | margin-left:0; 44 | top:100%; 45 | left:0; 46 | width:11px; 47 | height:20px; 48 | background:url(tip-skyblue_arrows.png) no-repeat -40px 0; 49 | } 50 | .tip-skyblue .tip-arrow-left { 51 | margin-top:0; 52 | margin-left:-11px; 53 | top:0; 54 | left:0; 55 | width:18px; 56 | height:13px; 57 | background:url(tip-skyblue_arrows.png) no-repeat -60px 0; 58 | } -------------------------------------------------------------------------------- /src/tip-twitter/tip-twitter.css: -------------------------------------------------------------------------------- 1 | .tip-twitter { 2 | opacity:0.8; 3 | z-index:1000; 4 | text-align:left; 5 | border-radius:4px; 6 | -moz-border-radius:4px; 7 | -webkit-border-radius:4px; 8 | padding:8px 8px; 9 | max-width:200px; 10 | color:#fff; 11 | background-color:#000; 12 | /** 13 | * - If you set a background-image, border/padding/background-color will be ingnored. 14 | * You can set any padding to .tip-inner instead if you need. 15 | * - If you want a tiled background-image and border/padding for the tip, 16 | * set the background-image to .tip-inner instead. 17 | */ 18 | } 19 | .tip-twitter .tip-inner { 20 | font:bold 11px/14px 'Lucida Grande',sans-serif; 21 | } 22 | 23 | /* Configure an arrow image - the script will automatically position it on the correct side of the tip */ 24 | .tip-twitter .tip-arrow-top { 25 | margin-top:-5px; 26 | margin-left:-5px; /* approx. half the width to center it */ 27 | top:0; 28 | left:50%; 29 | width:9px; 30 | height:5px; 31 | background:url(tip-twitter_arrows.gif) no-repeat; 32 | } 33 | .tip-twitter .tip-arrow-right { 34 | margin-top:-4px; /* approx. half the height to center it */ 35 | margin-left:0; 36 | top:50%; 37 | left:100%; 38 | width:5px; 39 | height:9px; 40 | background:url(tip-twitter_arrows.gif) no-repeat -9px 0; 41 | } 42 | .tip-twitter .tip-arrow-bottom { 43 | margin-top:0; 44 | margin-left:-5px; /* approx. half the width to center it */ 45 | top:100%; 46 | left:50%; 47 | width:9px; 48 | height:5px; 49 | background:url(tip-twitter_arrows.gif) no-repeat -18px 0; 50 | } 51 | .tip-twitter .tip-arrow-left { 52 | margin-top:-4px; /* approx. half the height to center it */ 53 | margin-left:-5px; 54 | top:50%; 55 | left:0; 56 | width:5px; 57 | height:9px; 58 | background:url(tip-twitter_arrows.gif) no-repeat -27px 0; 59 | } -------------------------------------------------------------------------------- /src/tip-violet/tip-violet.css: -------------------------------------------------------------------------------- 1 | .tip-violet { 2 | z-index:1000; 3 | text-align:left; 4 | border:1px solid #afafaf; 5 | padding:7px; 6 | min-width:50px; 7 | max-width:530px; 8 | color:#860404; 9 | background-color:#f2e7fd; 10 | background-image:url(tip-violet.png); /* bgImageFrameSize >= 9 should work fine */ 11 | /** 12 | * - If you set a background-image, border/padding/background-color will be ingnored. 13 | * You can set any padding to .tip-inner instead if you need. 14 | * - If you want a tiled background-image and border/padding for the tip, 15 | * set the background-image to .tip-inner instead. 16 | */ 17 | } 18 | .tip-violet .tip-inner { 19 | font:bold 12px/18px 'trebuchet ms',arial,helvetica,sans-serif; 20 | margin-top:-1px; 21 | padding:0 3px 2px 3px; 22 | } 23 | 24 | /* Configure an arrow image - the script will automatically position it on the correct side of the tip */ 25 | .tip-violet .tip-arrow-top { 26 | margin-top:-7px; 27 | margin-left:15px; 28 | top:0; 29 | left:0; 30 | width:16px; 31 | height:10px; 32 | background:url(tip-violet_arrows.png) no-repeat; 33 | } 34 | .tip-violet .tip-arrow-right { 35 | margin-top:-9px; /* approx. half the height to center it */ 36 | margin-left:-4px; 37 | top:50%; 38 | left:100%; 39 | width:10px; 40 | height:20px; 41 | background:url(tip-violet_arrows.png) no-repeat -16px 0; 42 | } 43 | .tip-violet .tip-arrow-bottom { 44 | margin-top:-6px; 45 | margin-left:15px; 46 | top:100%; 47 | left:0; 48 | width:16px; 49 | height:13px; 50 | background:url(tip-violet_arrows.png) no-repeat -32px 0; 51 | } 52 | .tip-violet .tip-arrow-left { 53 | margin-top:-9px; /* approx. half the height to center it */ 54 | margin-left:-6px; 55 | top:50%; 56 | left:0; 57 | width:10px; 58 | height:20px; 59 | background:url(tip-violet_arrows.png) no-repeat -48px 0; 60 | } -------------------------------------------------------------------------------- /src/tip-yellow/tip-yellow.css: -------------------------------------------------------------------------------- 1 | .tip-yellow { 2 | z-index:1000; 3 | text-align:left; 4 | border:1px solid #939393; 5 | padding:7px; 6 | min-width:50px; 7 | max-width:530px; 8 | color:#8c3901; 9 | background-color:#fef9d9; 10 | background-image:url(tip-yellow.png); /* bgImageFrameSize >= 10 should work fine */ 11 | /** 12 | * - If you set a background-image, border/padding/background-color will be ingnored. 13 | * You can set any padding to .tip-inner instead if you need. 14 | * - If you want a tiled background-image and border/padding for the tip, 15 | * set the background-image to .tip-inner instead. 16 | */ 17 | } 18 | .tip-yellow .tip-inner { 19 | font:bold 13px/18px 'trebuchet ms',arial,helvetica,sans-serif; 20 | margin-top:-2px; 21 | padding:0 3px 1px 3px; 22 | } 23 | 24 | /* Configure an arrow image - the script will automatically position it on the correct side of the tip */ 25 | .tip-yellow .tip-arrow-top { 26 | margin-top:-7px; 27 | margin-left:15px; 28 | top:0; 29 | left:0; 30 | width:16px; 31 | height:10px; 32 | background:url(tip-yellow_arrows.png) no-repeat; 33 | } 34 | .tip-yellow .tip-arrow-right { 35 | margin-top:-9px; /* approx. half the height to center it */ 36 | margin-left:-4px; 37 | top:50%; 38 | left:100%; 39 | width:10px; 40 | height:20px; 41 | background:url(tip-yellow_arrows.png) no-repeat -16px 0; 42 | } 43 | .tip-yellow .tip-arrow-bottom { 44 | margin-top:-6px; 45 | margin-left:15px; 46 | top:100%; 47 | left:0; 48 | width:16px; 49 | height:13px; 50 | background:url(tip-yellow_arrows.png) no-repeat -32px 0; 51 | } 52 | .tip-yellow .tip-arrow-left { 53 | margin-top:-9px; /* approx. half the height to center it */ 54 | margin-left:-6px; 55 | top:50%; 56 | left:0; 57 | width:10px; 58 | height:20px; 59 | background:url(tip-yellow_arrows.png) no-repeat -48px 0; 60 | } -------------------------------------------------------------------------------- /src/tip-darkgray/tip-darkgray.css: -------------------------------------------------------------------------------- 1 | .tip-darkgray { 2 | opacity:0.95; 3 | z-index:1000; 4 | text-align:left; 5 | text-shadow:#444 0 1px 1px; 6 | border:1px solid #888; 7 | padding:8px; 8 | min-width:50px; 9 | max-width:530px; 10 | color:#fff; 11 | background-color:#999; 12 | background-image:url(tip-darkgray.png); /* bgImageFrameSize >= 11 should work fine */ 13 | /** 14 | * - If you set a background-image, border/padding/background-color will be ingnored. 15 | * You can set any padding to .tip-inner instead if you need. 16 | * - If you want a tiled background-image and border/padding for the tip, 17 | * set the background-image to .tip-inner instead. 18 | */ 19 | } 20 | .tip-darkgray .tip-inner { 21 | font:bold 12px/18px arial,helvetica,sans-serif; 22 | margin-top:-1px; 23 | padding:0 4px 3px 4px; 24 | } 25 | 26 | /* Configure an arrow image - the script will automatically position it on the correct side of the tip */ 27 | .tip-darkgray .tip-arrow-top { 28 | margin-top:-7px; 29 | margin-left:15px; 30 | top:0; 31 | left:0; 32 | width:16px; 33 | height:10px; 34 | background:url(tip-darkgray_arrows.png) no-repeat; 35 | } 36 | .tip-darkgray .tip-arrow-right { 37 | margin-top:-9px; /* approx. half the height to center it */ 38 | margin-left:-7px; 39 | top:50%; 40 | left:100%; 41 | width:11px; 42 | height:21px; 43 | background:url(tip-darkgray_arrows.png) no-repeat -22px 0; 44 | } 45 | .tip-darkgray .tip-arrow-bottom { 46 | margin-top:-7px; 47 | margin-left:15px; 48 | top:100%; 49 | left:0; 50 | width:22px; 51 | height:13px; 52 | background:url(tip-darkgray_arrows.png) no-repeat -44px 0; 53 | } 54 | .tip-darkgray .tip-arrow-left { 55 | margin-top:-9px; /* approx. half the height to center it */ 56 | margin-left:-6px; 57 | top:50%; 58 | left:0; 59 | width:11px; 60 | height:21px; 61 | background:url(tip-darkgray_arrows.png) no-repeat -66px 0; 62 | } -------------------------------------------------------------------------------- /src/tip-yellowsimple/tip-yellowsimple.css: -------------------------------------------------------------------------------- 1 | .tip-yellowsimple { 2 | z-index:1000; 3 | text-align:left; 4 | border:1px solid #c7bf93; 5 | border-radius:4px; 6 | -moz-border-radius:4px; 7 | -webkit-border-radius:4px; 8 | padding:6px 8px; 9 | min-width:50px; 10 | max-width:300px; 11 | color:#000; 12 | background-color:#fff9c9; 13 | /** 14 | * - If you set a background-image, border/padding/background-color will be ingnored. 15 | * You can set any padding to .tip-inner instead if you need. 16 | * - If you want a tiled background-image and border/padding for the tip, 17 | * set the background-image to .tip-inner instead. 18 | */ 19 | } 20 | .tip-yellowsimple .tip-inner { 21 | font:12px/16px arial,helvetica,sans-serif; 22 | } 23 | 24 | /* Configure an arrow image - the script will automatically position it on the correct side of the tip */ 25 | .tip-yellowsimple .tip-arrow-top { 26 | margin-top:-6px; 27 | margin-left:-5px; /* approx. half the width to center it */ 28 | top:0; 29 | left:50%; 30 | width:9px; 31 | height:6px; 32 | background:url(tip-yellowsimple_arrows.gif) no-repeat; 33 | } 34 | .tip-yellowsimple .tip-arrow-right { 35 | margin-top:-4px; /* approx. half the height to center it */ 36 | margin-left:0; 37 | top:50%; 38 | left:100%; 39 | width:6px; 40 | height:9px; 41 | background:url(tip-yellowsimple_arrows.gif) no-repeat -9px 0; 42 | } 43 | .tip-yellowsimple .tip-arrow-bottom { 44 | margin-top:0; 45 | margin-left:-5px; /* approx. half the width to center it */ 46 | top:100%; 47 | left:50%; 48 | width:9px; 49 | height:6px; 50 | background:url(tip-yellowsimple_arrows.gif) no-repeat -18px 0; 51 | } 52 | .tip-yellowsimple .tip-arrow-left { 53 | margin-top:-4px; /* approx. half the height to center it */ 54 | margin-left:-6px; 55 | top:50%; 56 | left:0; 57 | width:6px; 58 | height:9px; 59 | background:url(tip-yellowsimple_arrows.gif) no-repeat -27px 0; 60 | } -------------------------------------------------------------------------------- /demo/includes/demos.js: -------------------------------------------------------------------------------- 1 | $(function(){ 2 | 3 | // ================================= 4 | // init SHJS (syntax highlither) 5 | // ================================= 6 | window.sh_highlightDocument(); 7 | $('pre.sh_sourceCode').parent() 8 | .hover(function(){ 9 | var $div = $(this); 10 | if ($div.data('hideTimeout')) { 11 | clearTimeout($div.data('hideTimeout')); 12 | $div.data('hideTimeout', 0); 13 | } 14 | if (!$div.data('active')) { 15 | $div.data('showTimeout', 16 | setTimeout(function(){ 17 | var $pre = $div.children().eq(-1), 18 | scrollBarFix = 30, 19 | width = $pre[0].scrollWidth > $pre.outerWidth() ? 20 | Math.min($pre[0].scrollWidth + scrollBarFix, $(window).width() - scrollBarFix - $div.offset().left) : 21 | $pre.outerWidth(), 22 | height = document.defaultView && document.defaultView.getComputedStyle && parseFloat(document.defaultView.getComputedStyle($div[0], null).height) || $div.height(); 23 | $div.wrap('
') 24 | .css({position: 'absolute', width: width, height: height}).data('active', true) 25 | .find('> a').fadeIn(500); 26 | }, 500) 27 | ); 28 | } 29 | }, function(){ 30 | var $div = $(this); 31 | if ($div.data('showTimeout')) { 32 | clearTimeout($div.data('showTimeout')); 33 | $div.data('showTimeout', 0); 34 | } 35 | if ($div.data('active') && !$div.data('plainView')) { 36 | $div.data('hideTimeout', 37 | setTimeout(function(){ 38 | $div.unwrap().css({position: 'relative', width: '', height: ''}).data('active', false) 39 | .find('> a').hide(); 40 | }, 500) 41 | ); 42 | } 43 | }) 44 | .prepend('').find('> a').addClass('view-plain').attr('href', '#').text('View plain code') 45 | .click(function(){ 46 | var $link = $(this), 47 | $div = $link.parent(), 48 | $pre = $link.next(), 49 | $window = $(window), 50 | scrollPos = [$window.scrollLeft(), $window.scrollTop()], 51 | value = $pre.text(), 52 | height = $pre.outerHeight() + (window.opera && window.opera.version && window.opera.version() < 10.5 ? $pre[0].scrollHeight / ((value.replace(/\r\n/g, '\n').match(/\n/g) || '').length + 1) : 0); 53 | $('