Jquery find next element inside a complex div

0

Friends, I need to find an element in a DOM tree a bit complex and I'm not getting the result. When I quit input id = "barcode" I add new lines below and I need to click the next button on the player.

The code below has comments that you can understand better.

I am using the following code when exiting the first input but it is not working:

var div_leitor = $('div.leitor').nextAll('div.leitor').first();
var barcode_clique = $(div_leitor).find('.barcode_btn');
$(barcode_clique).click();

HTML and comments are in the gist as well as js: link

Could someone give me a hand? Thanks

    
asked by anonymous 20.08.2016 / 16:22

0 answers