Menu
case 1:
[code=html]
var viewMore = ‘<span class=”view-more”>view more<span>’;
case 2:
[code=html]
var viewMore = ‘<a class=”view-more” href=”#”>view more<span>’;
jQuery(‘.view-more’).click(function(){
console.log(jQuery(this).next());
}
in case 1 the result is the next element, after ‘.view-more’ which Is what I expect.
However, in case 2, the result is not the next element, but the link itself. WHYYYYYYYY