我正在开发一个新项目http://www.hotwirerevealed.com,它揭示/识别 hotwire.com 上的酒店。输入状态和目的地后,我有一个使用 jquery 的 .post 方法发布的 javascript 函数。发布请求转到输出 html 的 php 页面,我使用 jquery 的 html 方法将内容放置在页面上。
像这样
function post(){
$.post("lookup.php", {action: "find", area: area, stars: stars, amenities: amenities, state: $('#state').val()}, function(data){
$("#details").html(data);
});
}
我有指向我喜欢在灯箱中使用的酒店的超链接
<a class="hotel" href="http://google.com/search?btnI=1&q=Amerisuites+Northeast+Orlando+(Airport+MCO)">Amerisuites Northeast</a>
我试图使用 jquery 的花哨的盒子,但花哨的盒子
$(document).ready(function(){
$(".hotel").fancybox({
'width' : '75%',
'height' : '75%',
'type' : 'iframe'
});
});
但它似乎不起作用,我猜是因为 jquery 不知道那里的元素?我尝试使用 jquery live() 方法收效甚微,任何帮助将不胜感激,提前感谢