I have a link with the id:
nyhedsklik
I this function that gets triggered when clicking on the link:
$('a.poplight[href^=#]').click(function() {
var popID = $(this).attr('rel'); //Get Popup Name
var popURL = $(this).attr('href'); //Get Popup href to define size
I have just taken a part of the function for an example....
Now I want to make a click on the link with Jquery. Just like a user would do I have tried this which does not work:
<script>
$(document).ready(function() {
$('#nyhedsklik').trigger("click");
});
</script>
If you use the click() method with no parameters, Jquery will simulate a click…