How to alert using jQuery

后端 未结 3 709
野性不改
野性不改 2021-01-30 16:10

This works:

$(\'.overdue\').addClass(\'alert\');

But this doesn\'t:

$(\'.overdue\').alert(\'Your book is overdue.\'); 
<         


        
3条回答
  •  长发绾君心
    2021-01-30 17:09

    For each works with JQuery as in

    $().each(function() {
       //this points to item
       alert('');
    });
    

    JQuery also, for a popup, has in the UI library a dialog widget: http://jqueryui.com/demos/dialog/

    Check it out, works really well.

    HTH.

提交回复
热议问题