当前位置: 动力学知识库 > 问答 > 编程问答 >

javascript - Trigger not working on newly created link

问题描述:

I am using the fasw javascript library - http://www.fasw.ws/faswwp/non-jquery-page-transitions-lightweight/ - to do page transitions in a webapp. It can only appear to be triggered via a data attribute on a link.

$('body').prepend('<a class="decider_link_trigger" href="#">[Trigger]</a>');

$('.decider_link_trigger').attr('data-ftrans', 'flip');

$('.decider_link_trigger').attr('href', selected.result);

$('.decider_link_trigger').trigger('click');

The above code adds such a link to the page with the provided data-ftrans attribute and is even clickable manually, but I can't figure out how to submit the link with jQuery (or event Javascript).

I cannot do a manual window.location.href = selected.result; as this will not use the transition library.

Thanks!

分享给朋友:
您可能感兴趣的文章:
随机阅读: