Autor | Zpráva | ||
---|---|---|---|
Mároš Profil |
Ahoj, s javascriptem nejsem ani trošku kamarád a po třech hodinách hloubání a dloubání jsem fakt v koncích....
Musím použít jQuery bubble popup v3. Mějme tabulku cca takovou: <table> <thead> <th><span>#</span></th> <th><span>Name</span></th> <th><span>Nat.</span></th> <th><span>Age</span></th> <th><span class="popupBox"><img src="/images/icons/icon.png" alt="Alt1"></span></th> <th><span class="popupBox"><img src="/images/icons/icon.png" alt="Alt2"></span></th> ....... ....... </thead> <tr class="subheader"> <td colspan="15">Title</td> </tr> <tr> <td>1</td> <td>2</td> <td>3</td> <td class="popupBox">4</td> <td class="popupBox">5</td> <td class="popupBox">6</td> </tr> </tbody> </table> <script type="text/javascript"> $(document).ready(function () { //create bubble popups for each element with class "button" $('.popupBox').CreateBubblePopup(); //set customized mouseover event for each button $('.popupBox').mouseover(function(){ //show the bubble popup with new options $(this).ShowBubblePopup({ position: 'bottom', align:"center", tail: { align:"center"}, innerHtml: $(this).children("img").attr("alt") ? $(this).children("img").attr("alt"), innerHtmlStyle:{ color: '#0e6aaa'}, closingSpeed: 1, themeName:"grey", themePath: "/jquerybubblepopup-themes" }); }); </script> Já bych ale potřeboval v <tbody> pro každý <td class="popupBox"> zobrazit popup, ve kterým by byla "Hlavička + obsah <td>". Hlavičkou myslím to <th>, ke kterýmu daná hodnota patří. Například b to mělo vypadat cca takto: "alt2 6" Jde to pomocí javascriptu? TIpuju že to bude něco s .each(), ale jistej si nejsem :) Velice díky za odpověď :) Marek |
||
Časová prodleva: 13 let
|
0