IfnotFr / PopConfirm

A simple action confirmation plugin for jQuery based on Twitter Bootstrap Popover

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How can I popup the box conditionally?

LJTDiSZ opened this issue · comments

Hi,
This is a nice plugin.

Is there a way to popup the box only when some conditions satisfied?

For example,
there are multiple rows, each row have a check box.
and there is a button, clicking the button will delete all the checked/selected rows. Using your plugin, it will popup a confirmation box before delete all the selected rows.

The question is, if none of rows are selected, clicking the button still popups the confirmation box.

Is there a way to NOT popup the confirm box when click the button if none of rows are selected?

Thanks.

There is no way to programatically disable the popconfirm handler without any selector already on the item.

But you can disable with not :

$('.popconfirm-items').not('.disabled').popconfirm();