w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
trigger('click') doesn't work on anchors without an actuall link in the href ( js function in the href attrbute )

trigger('click') will only invoke attached event handlers; if you have JavaScript hrefs, they won't be triggered.

You could try attaching regular click handlers to your links, or you could do something like this instead:

var idFormat = /confirm_(d+)/;
$('.confirm_btn').each(function() {
    var btn = $(this);
    var id = parseInt(idFormat.exec(btn.attr('id'))[1], 10);
    confirm_ajax(id);
});




© Copyright 2018 w3hello.com Publishing Limited. All rights reserved.