custom jquery UI tooltip

custom jquery UI tooltip

Hi,

I'm trying to use jquery tooltip to show a div with an image and text.

here is my HTML structure :

  1. <span class="reference">
    <span class="marque" title="test">Adobe</span>
    <span class="details"><img src="/img/monimage.jpg" alt="alt">Descriptif du travail effectué pour Adobe..
    </span>
    </span>



here is my js :
  1. <script type="text/javascript">
    $(function() {
        $(".details").hide();
        $(".marque").tooltip({
            items: $('.details'),
            content: function() {
                var element = $( this );
                return "tooltip";
            }
        });
    });
    </script>










but the "content" function does not seems to be called.. i always get the content of the title attribute instead of the "tooltip" text that is returned by "content"..

i've tried also

  1. $(function() {
        $(".details").hide();
        $(".marque").tooltip({
            content: "Tooltip"
        });
    });




but i still have the title attribute shown in the tooltip..

How can i do to show span .details content, instead ?

Thanks !