jeudi 14 juillet 2016

jquery click simulation is firing but no event take place

my case is a bit different from all I have seen so far. The element is found the click event is fired but that is it. there is an event loading on the button but what is supposed to happen doesn't happen. Here is my click code. $(".rowclass[maininfo_name='XX'] .btn-mybottonclass:first a").click(); I also tried the following: $(document).ready(function(){$(".rowclass[maininfo_name='XX'] .btn-mybottonclass:first a").trigger('click');}); $(document).ready(function(){$(".rowclass[maininfo_name='XX'] ..btn-mybottonclass:first > a").click(function () { console.log('click');});}); all of them are giving the same results. To notice I have multiple .rowclass classes, within which I have .btn-mybottonclass and within each .btn-mybottonclass I have a hyperlink. I however want to click on the first .btn-mybottonclass hyperlink. I hope I am making sense.

Aucun commentaire:

Enregistrer un commentaire