jquery ui.sortable with tooltips

Posted by FFish on Stack Overflow See other posts from Stack Overflow or by FFish
Published on 2010-05-05T16:46:38Z Indexed on 2010/05/05 16:58 UTC
Read the original article Hit count: 376

On a page I have a sortable list with thumbnails. When rolling over the images I wanted a tooltip to show a bigger image. I found qTip, but maybe there is something better / easier?

How can I connect the imgPath var from the sortable to the qtip?

var imgPath = '<img src="002171/imm/001.jpg" />';

$("#sortable").sortable();
$("#sortable").disableSelection();

$('#sortable li img').qtip({
    content: {
        text: imgPath
    }
});


<div id="demo">
    <ul id="sortable">
        <li><img src="002171/tn/001.jpg" /></li>
        <li><img src="002171/tn/002.jpg" /></li>
        <li><img src="002171/tn/003.jpg" /></li>
    </ul> 
</div>

© Stack Overflow or respective owner

Related posts about jquery-ui-sortable

Related posts about tooltip