I have a link:
<ul id="titleee" class="gallery">
<li>
<a href="#inline" rel="prettyPhoto">Talent</a>
</li>
</ul>
and I am trying to trigger it by using:
$(document).ready(function() {
$('#titleee').find('a').trigger('click');
});
But it doesn't work.
I've also tried: $('#titleee a').trigger('click');
Edit:
I actually need to trigger whatever get's called here <a href="#inline" rel="prettyPhoto">
location.href($('#titleee').find('a').attr("href"));
? – Papyrus$('#titleee a')[0].click();
. In other words, use the DOM click method, not the jQuery one. Upvote Graham Hotchkiss! – Lozada$('ul#titleee li a[href="#inline"]').click();
– Skiagraph