Jquery 使用ajax+;色盒不工作

Jquery 使用ajax+;色盒不工作,jquery,ruby-on-rails,ajax,colorbox,Jquery,Ruby On Rails,Ajax,Colorbox,我在rails上,当我在我的视图中看到它时,GoogleDirections小部件就会加载 <div> <script src="//www.gmodules.com/ig/ifr?url=http://hosting.gmodules.com/ig/gadgets/file/114281111391296844949/driving-directions.xml&amp;up_fromLocation=&amp;up_myLocations=<%=

我在rails上,当我在我的视图中看到它时,GoogleDirections小部件就会加载

<div>
  <script src="//www.gmodules.com/ig/ifr?url=http://hosting.gmodules.com/ig/gadgets/file/114281111391296844949/driving-directions.xml&amp;up_fromLocation=&amp;up_myLocations=<%= @meeting.location.address %>&amp;up_defaultDirectionsType=&amp;up_autoExpand=&amp;synd=open&amp;w=320&amp;h=55&amp;title=Directions+by+Google+Maps&amp;lang=en&amp;country=US&amp;border=%23ffffff%7C3px%2C1px+solid+%23999999&amp;output=js"></script>
</div>

但是,如果我的页面上有一个链接,比如说“方向”,当有人单击方向时,我希望上面的内容加载到一个颜色框中,那么这个小部件就不会加载

$(".location-directions").click(function(){
  $(this).colorbox({
        open: true,
        href: "/directions?mid=<%= @meeting.id %>",
        width: "400px",
        height: "300px",
        overlayClose:true,
        escKey:true,
        returnFocus:true
    });
    return false;
})
$(“.location directions”)。单击(函数(){
$(此).colorbox({
开放:是的,
href:“/directions?mid=”,
宽度:“400px”,
高度:“300px”,
是的,
艾斯基:没错,
returnFocus:对
});
返回false;
})
打开的颜色框为空。没有小部件。“/directions”路径打开一个视图,该视图再次具有相同的google脚本路径:

<div>
  <script src="//www.gmodules.com/ig/ifr?url=http://hosting.gmodules.com/ig/gadgets/file/114281111391296844949/driving-directions.xml&amp;up_fromLocation=&amp;up_myLocations=<%= @meeting.location.address %>&amp;up_defaultDirectionsType=&amp;up_autoExpand=&amp;synd=open&amp;w=320&amp;h=55&amp;title=Directions+by+Google+Maps&amp;lang=en&amp;country=US&amp;border=%23ffffff%7C3px%2C1px+solid+%23999999&amp;output=js"></script>
</div>


有什么线索吗?

我也有同样的问题,在我花了5个小时尝试不同的东西之后,我终于想出了一个办法,我应该把“http:”放在//www=“。。。 所以应该是这样的“http://www.gmodules.com...etc"
希望这有点帮助,去睡觉吧。

Hey blast250,谢谢你的帮助。我确实尝试过添加http,但仍然没有成功。我目前正在做其他事情,但需要稍后再讨论。