Probably very stupid question but I can't find a satisfying solution.
I do have a list of anchors each displaying a different rss feed in a designated area on the page (div).
$(".rssfeed").bind('click', function(e) {
e.preventDefault();
$('.focus').removeClass('focus');
$(this).addClass('focus');
$('#rssarea').rssfeed($(this).attr('href'), {limit:10});
});
Now with jquery how do i invoke the click event on the first link, so that the rssarea gets populated with feeds and the link itself gets it's focus class? I was hoping for something like:
$('#rss1').sendEvent('click');
but sendEvent does not exist, any 开发者_开发知识库other solutions?
regards, Jeroen.
You can trigger it:
$('#rss1').trigger('click');
you can use
$('#target').click();
精彩评论