道歉,这里有一个新的.如何加载其他插件,并在加载ajax生成的页面后让其他单独的脚本运行?这是我的代码:
jQuery(document).ready(function($) {
var $mainContent = $("load-content"),siteUrl = "http://" + top.location.host.toString(),url = '';
$(document).delegate("a[href^='"+siteUrl+"']:not([href*='/wp-admin/']):not([href*='/wp-login.PHP']):not([href$='/Feed/'])","click",function() {
if($.browser.msie){
var myie="/"+this.pathname;
location.hash = myie;
//alert(location.hash);
}else{
location.hash = this.pathname;
}
return false;
});
$("#searchform").submit(function(e) {
$search = $("#s").val();
$search = $.trim($search);
$search = $search.replace(/\s+/g,'+');
location.hash = '?s='+$search;
e.preventDefault();
});
$(window).bind('hashchange',function(){
url = window.location.hash.substring(1);
if (!url) {
return;
}
url = url + " #content";
$('html,body,document').animate({scrollTop:0},'fast');
$mainContent.fadeOut(500,function(){$('#content').fadeOut(500,function(){
$("#loader").show();});}).load(url,function() {
$mainContent.fadeIn(500,function(){
$("#loader").hide(function(){ $('#content').fadeIn(500);});});});
});
$(window).trigger('hashchange');
});
页面上的嵌入对象如何保留其功能?主要是视频,幻灯片和其他使用javascript的媒体
VIMEO
和