Display qTip onmouseover

I am trying to validate a form using jQuery validation and displaying error messages using qTip. But I want to show the error message onMouse Over, and now when I submit the form, the error messages get closer to the text field.

How can I show an error message when I hover over a text field.

Demo - http://jsfiddle.net/UcaZT/

RVI

+3
source share
1 answer

The code showing qtip tooltips looks like this:

// Apply the tooltip only if it isn't valid
$(element).filter(':not(.valid)').qtip({
    overwrite: false,
    content: error,
    position: position,
    show: {
        event: false,
        ready: true
    },
    hide: false,
    style: {
        classes: 'ui-tooltip-red' // Make it red... the classic error colour!
    }
});

it

show: {
    event: false,
    ready: true
},

tells qTip to prompt tooltips immediately.

You want something like this:

    show: {
        event: 'mouseover'
    },
    hide: {
        event: 'mouseout'
    },

Here is the updated jsFiddle

+4
source

All Articles