我想加载fancybox以在div中显示查询信息。在 Firebug 中,我可以看到一切顺利,但幻想框窗口没有像我预期的那样弹出。我错过了什么让它可以弹出?
<td><a class="pop" href="#gps_information" id="<?php echo $gps->labref ?>"><?php echo $gps->labref ?></a><input type="hidden" id="labref" value=""/></td>
<div id="gps_information">
</div>
$(document).ready(function () {
$('.pop').click(function () {
labref = $(this).attr('id');
$.ajax({
type: "GET",
url: "<?php echo base_url(); ?>sample_location/gps/" + labref,
dataType: "json",
success: function (data) {
var data = "I am waiting";
$('#gps_information').html(data);
$('.pop').fancybox({});
return true;
},
error: function (data) {
return false;
}
});
return false;
});
});