Custom attribute requiring double click (featherlight lightbox)

前端 未结 2 1860
臣服心动
臣服心动 2021-01-22 15:56

So, here is the jsfiddle:

Here is the link to the plugin (featherlight lightbox)

The issue is that using the default targetAttr (which is data-featherligh

2条回答
  •  伪装坚强ぢ
    2021-01-22 16:07

    $('selector').featherlight() (or using data-featherlight) is for binding, like $('selector').click( function() {...} ).

    $.featherlight(...) is for triggering, like $('selector').click()

    So, bind on click and trigger, or bind via $('...').featherlight, but don't bind on click and then bind in that handler, like you're doing now.

提交回复
热议问题