开发者

Tooltip on button click using jquery

开发者_开发百科How can I show an error message using tooltip on click of a button and that too if there is error, else the button should just work fine to submit the form?

Here is what I have tried with modal dialog

$.fx.speeds._default = 1000;
$(function() {
 $('#dialog').dialog({autoOpen:false,show:'blind',hide:'explode'});
 $('#savej').click(function(){$('#dialog').dialog('open');return false;});
});


$('#savej').click(function(e){
    if (hasErrors()) { // Some checking for errors
        e.preventDefault();
        $('#dialog').dialog('open');
    }
});
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜