searched lot, didn't find solution...
short version
there way call lightbox without <a>
-tag?
long version :p
want display pics in table, every pic new table cell.
pic should centered.
should possible click anywhere inside table cell open lightbox.
size of pic 100px * 100px.
at moment code table cell looks this:
<td align="center" width="150" height="150"> <a href="mypic.jpg" data-lightbox="mygallery" data-title="my title" class="linkcell"> <img src="mypic.jpg"> </a> </td>
additional css-file
a.linkcell{ display: block; width: 100%; height: 100%; } td:hover{ background-color: #b6849c; }
since position of the pic isn't centered(hovering on left table cell) , can't change position, no matter do, i'd use onclick
, working quite fine, lightbox.
came mind:
<td align="center" width="150" height="150" onclick="..."> <img src="mypic.jpg"> </td>
what have write instead of ..., open lightbox? it'd okay use javascript. alternative lightbox2 okay, too. or have solution?
thank in advance, masterbolle
i think :
//set album values img = $('<a href="...">') .attr('data-lightbox','roadtrip') .append('<img src="...">') //lightbox open: img.click(function(){ lighbox.start($(this)); return false; })
reference : lightbox 2: how add dynamically images via javascript
Comments
Post a Comment