我正在使用GalleriaJavaScript 插件,我需要显示图像,full Screen mode我已经检查API并有一个方法。
.enterFullscreen( [callback] )
returns Galleria
This will set the gallery in fullscreen mode. It will temporary manipulate some document styles and blow up the gallery to cover the browser screen. Note that it will only fill the browser window, not the client screen (javascript can’t do that).
我正在使用ZK Framework此代码响应按钮单击。
public void imageZoomer()
{
Clients.evalJavaScript("$('#galleria').data('galleria').enterFullscreen(function() {alert('full screen mode');})");
}
但什么也没发生我也尝试使用
Clients.evalJavaScript("imageZoomer()");
和这样的javascript功能
function imageZoomer()
{
alert('before');
$('#galleria').data('galleria').enterFullscreen(function(){alert('full screen mode');})
alert('after');
}
上面的函数被调用但没有任何反应但是如果在萤火控制台上尝试这个代码
$('#galleria').data('galleria').enterFullscreen(function(){alert('full screen mode');})
它工作顺利我做错了什么非常感谢。