I have the following element:
<a href="#" class='popup register'>Register</a>
and I want to trigger a clic action on this, how do I do this? I tried doing:
$('.popup .register').trigger('click');
but it didn't work
Remove the space between the selectors.
$('.popup.register').trigger('click');
.popup .register means that trigger click event on the element with class register which is a child of element with class popup. So in your particular scenario this won't work as they are both on the same element.