var args = { objectType: "iframe",
align: "center",
width: "356",
height: "500",
src: "http://my.api.endpoint?id=",
}
$("a[rel='highslide']").on("click",function(){
var id = $(this).data("id");
var setargs = args;
setargs.src += id;
hs.htmlExpand($(this), setargs );
});
无论出于何种原因,这只是旋转和旋转,并且不会加载我的端点或任何其他src。
答案 0 :(得分:0)
无论如何,这是解决方案:
<script>
//listener for links
var args = { objectType: "iframe",
align: "center",
width: "456",
height: "500",
src: "http://my.api.endpoint?id=",
}
hs.onSetClickEvent = function ( sender, e ) {
e.element.onclick = function () {
var id = $(this).data("id");
var setargs = args;
setargs.src += id;
return(hs.htmlExpand(this, args));
}
return false;
}
</script>
<a rel="highslide-iframe">Link, here.</a>