Forum Moderators: coopster

Message Too Old, No Replies

tipso tooltip does not show image as tooltip content

Help fix the proper code

         

smilem

9:31 pm on Sep 4, 2017 (gmt 0)

5+ Year Member



Hello, I try to use

[tipso.object505.com...]
[github.com...]

my code is:

<script>
jQuery(document).ready(function(){
jQuery('.img-tipso').tipso({
useTitle: false,
background: 'rgba(0,0,0,0.8)',
position: 'top-left'
});

});

});
</script>


If I show image with test tooltip it works fine

<img src="http://www.domain.com/demo.png" class="img-tipso" data-tipso="test">


If I try to show content as image too it does not work

<img src="http://www.domain.com/demo.png" class="img-tipso" data-tipso="<img src="http://www.domain.com/demo.png"">

Do not suggest Ajax tooltip option because of this
[dreamincode.net...]

phranque

4:33 am on Sep 5, 2017 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



<img src="http://www.domain.com/demo.png" class="img-tipso" data-tipso="<img src="http://www.domain.com/demo.png"">


two obvious syntax problems here.
- you are missing a closing bracket between the consecutive double quotes.
- the double quotes for the data-tipso attribute conflict with the double quotes for the src attribute

once you've solved the syntax errors make sure you are using the correct attribute for the tooltip content.