hey there

i am using the tooltip plug (jquery.bassistance.de/tooltip/demo) and
it works pretty good.
the best pasrt of the option to draw the image SRC straight from the
REL attirbute!

it offers you the option to set a width for the tooltip.
my issue is that while it does resize the width - the height does not
resize itself respectively - so long (portrait) pictures get resized
to wide (landscape) pictures. It seems to take the dimension ration
from the first element that its called on, and then the rest stay the
same - the same height (but wrong ratio)


i have also tried setting the width in %, but that didnt seem to do
much.

any help appreciated
Thanks!



here's my code:

JAVASCRIPT:
<script type="text/javascript" src="/includes/jquery.tooltip.js"></
script>
<script type="text/javascript">
$(function() {
        $('.imgBlock a.screenshot').tooltip({
                delay: 0,
                showURL: false,
                bodyHandler: function() {
                        return $("<img/>").attr({
                                src: this.rel,
                                width: "300"
                                });
                }
        });

});


HTML:

  <div class="imgBlock"><a href="/galleries/picture.asp?
ImgID=868002&keywords=" title="עתיקות"  class="screenshot" rel="/
uploads/system/mainPics/279_C95D354B97.jpg"><img src="/uploads/system/
thumbs/279_C95D354B97.jpg" title="עתיקות" height="110" border="0"></a>
</div>
  <div class="imgBlock"><a href="/galleries/picture.asp?
ImgID=845082&keywords=" title="רחוב בגשם"  class="screenshot" rel="/
uploads/system/mainPics/279_A15FD63CCZ.jpg"><img src="/uploads/system/
thumbs/279_A15FD63CCZ.jpg" title="רחוב בגשם" height="110" border="0"></
a> </div>

Reply via email to