What does data-ajax=“false” really do?

后端 未结 3 1875
伪装坚强ぢ
伪装坚强ぢ 2021-01-01 16:47

The links on my site don\'t work and I got an solution of using data-ajax=\"false\" on my anchors without getting a true explanation. Can someone help me?

3条回答
  •  北荒
    北荒 (楼主)
    2021-01-01 17:15

    if you set the attribute of an element to data-name, you can, through jQuery, fetch it using $('element').data('name') instead of $('element').attr('data-name');, but data-* attributes can still be used for event delegation, like $(document).on('click', '[data-name]', function(){});

提交回复
热议问题