Skip to content Skip to sidebar Skip to footer

Jquery Hovercard

I'm using http://designwithpc.com/Plugins/Hovercard , but I can't find out how to declare a var on hovercard. Every job-desc has his own ID and it should be call when hovering labe

Solution 1:

Give this a shot: http://jsfiddle.net/X2q9z/

$('.labeldesc').hovercard({
    onHoverIn: function() {
        var txt = $($(this).parents('li')[0]).find('.job-descr').html();
        $(this).find('.hover_text').html(txt);
    },
    detailsHTML: '<div class="hover_text"></div>'
});

Solution 2:

First of all your jQuery Code has issue. You cannot use var inside calling hovercard function.

I update it as you wanted. Please take a loot at this: http://jsfiddle.net/cnCmN/

$('.labeldesc').each(function(){
    $(this).hovercard({
        detailsHTML: $("#hiden-"+$(this).closest('.item').attr('id')).html()
    });
});

Post a Comment for "Jquery Hovercard"