Reputation: 2570
Very strange... This page is something protected or anything i don't know? I tried to click Next page anchor.
See this page first.
I tried to grab the element using this
var buttonNext = $('a.next-page');
if(buttonNext.length > 0){
console.log('found!');
// but when clicking still give the page not move or anything
buttonNext.click();
// or even no effect at all, same thing...
buttonNext.trigger('click');
}
Upvotes: 0
Views: 54
Reputation:
$('a.buttonNext')
selector is an array of elements (all a
elements with a buttonNext
className), even if there is only one element it still return an array of one element, not the element it self.
I presume you have only one buttonNext
element, in that case this should do the work
buttonNext[0].click();
Upvotes: 1