开发者

Showing qTip onmouseover

开发者 https://www.devze.com 2023-02-16 23:22 出处:网络
I am trying to validate a form, using jQuery validate and show errors messages using qTip. But i want to show error mes开发者_JS百科sage onMouse Over, as of now when i submit the form the error messag

I am trying to validate a form, using jQuery validate and show errors messages using qTip. But i want to show error mes开发者_JS百科sage onMouse Over, as of now when i submit the form the error messages are coming next the text field.

How do i show the error message when i mouseover the textfield.

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

rvi.


The code showing the 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!
    }
});

This

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

tells qTip to open the tooltips immediately.

You want something like this:

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

Here is an updated jsFiddle

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号