【发布时间】:2011-10-18 02:54:40
【问题描述】:
我有一个代码,在单击链接 ('#versionPageFromProdLink') 后,会将页面重定向到索引页面。索引页面包含该内容。我想在页面重定向后隐藏它并显示我拥有的下一个 div ()。
页面被重定向,但是在 window.location.replace( url ); 之后的 jQuery 函数;行没有被调用。
页面重定向后如何重定向和调用 jQuery?
代码:
jQuery( '#versionPageFrmProdLink').click( function(){
window.location.replace( url );
// jQuery code below is not called, <div id="versionMainContent"> is not hidden
jQuery(".versionMainContent").hide("fast", function(){
jQuery( ".versionProductContent" ).show();
});
});
【问题讨论】:
标签: javascript jquery