MaxRom | Scripturi uCoz Romania

Bannerul tau aici
[ Mesaje noi · Membrii · Regulamentul forumului · RSS ]
  • Pagina 1 din 1
  • 1
Forum » uCoz system » Alte » Tooltip ca pe facebook
Tooltip ca pe facebook
Muşatinu Date: Duminică, 2012-09-02, 20:39 | Message # 1
Mesaje: 1801
Awards: 202
« 53 »

[texterror1]Update 03:09:2012
Sa adaugat biblioteca jQuery 1.4.2.min.js pentru ca scriptu sa functioneze si pe IE
[/texterror1]

Demo: http://demomaxrom.ucoz.ro/index/0-4

Pe paginile unde vreti sa apara, intre
Cod
<head> si </head>
puneti:
Cod

<script type="text/javascript" src="http://maxrom.ucoz.com/js/jquery-1.4.2.min.js"></script>
<script type="text/javascript" src="http://maxrom.ucoz.com/js/jquery.tipsy.js"></script>
<script type='text/javascript'>
          $(function() {
          $('#north').tipsy({gravity: 'n'});
          $('#south').tipsy({gravity: 's'});
          $('#east').tipsy({gravity: 'e'});
          $('#west').tipsy({gravity: 'w'});
          $('#north-west').tipsy({gravity: 'nw'});
          $('#north-east').tipsy({gravity: 'ne'});
          $('#south-west').tipsy({gravity: 'sw'});
          $('#south-east').tipsy({gravity: 'se'});
          });
</script>


In CSS puneti:

Cod
.tipsy { padding: 5px; font-size: 10px; position: absolute; z-index: 100000; }
           .tipsy-inner { padding: 5px 8px 4px 8px; background-color: black; color: white; max-width: 200px; text-align: center; }
           .tipsy-inner { border-radius: 3px; -moz-border-radius:3px; -webkit-border-radius:3px; }
           .tipsy-arrow { position: absolute; background: url('http://maxrom.ucoz.com/imagini/tipsy.gif') no-repeat top left; width: 9px; height: 5px; }
           .tipsy-n .tipsy-arrow { top: 0; left: 50%; margin-left: -4px; }
             .tipsy-nw .tipsy-arrow { top: 0; left: 10px; }
             .tipsy-ne .tipsy-arrow { top: 0; right: 10px; }
           .tipsy-s .tipsy-arrow { bottom: 0; left: 50%; margin-left: -4px; background-position: bottom left; }
             .tipsy-sw .tipsy-arrow { bottom: 0; left: 10px; background-position: bottom left; }
             .tipsy-se .tipsy-arrow { bottom: 0; right: 10px; background-position: bottom left; }
           .tipsy-e .tipsy-arrow { top: 50%; margin-top: -4px; right: 0; width: 5px; height: 9px; background-position: top right; }
           .tipsy-w .tipsy-arrow { top: 50%; margin-top: -4px; left: 0; width: 5px; height: 9px; }


acum, fiecare fraza care doriti sa aiba acest tooplit il puneti in hiperlink in felul urmator:

Cod
<a id='north-west' href='#' title='This is an example of north-west gravity'>Northwest</a>
                    
               <a id='north' href='#' title='This is an example of north gravity'>North</a>
                    
               <a id='north-east' href='#' title='This is an example of north-east gravity'>Northeast</a>
                     
               <a id='west' href='#' title='This is an example of west gravity'>West</a>
                      
               <a id='east' href='#' title='This is an example of east gravity'>East</a>
                     
               <a id='south-west' href='#' title='This is an example of south-west gravity'>Southwest</a>
                      
               <a id='south' href='#' title='This is an example of south gravity'>South</a>

               <a id='south-east' href='#' title='This is an example of south-east gravity'>Southeast</a>


id='north' arata cum sa fie pozitionat acest tooltip, va uitati in demo.

[texterror4]Sursa: http://onehackoranother.com
[/texterror4]



 
Forum » uCoz system » Alte » Tooltip ca pe facebook
  • Pagina 1 din 1
  • 1
Căutare: