Java ZK+Javascript JQuery Galleria IO FullScreenMode

406 Views Asked by At

i am using Galleria plugin for JavaScript i need show the image in full Screen modei have checked the APIand have a method.

.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).

API

i am using ZK Framework responding to a button click using this code.

public void imageZoomer()
{
        Clients.evalJavaScript("$('#galleria').data('galleria').enterFullscreen(function() {alert('full screen mode');})");     
}

but nothing happens i have also try using

Clients.evalJavaScript("imageZoomer()"); 

and a javascript function like this

function imageZoomer()
{
alert('before');
$('#galleria').data('galleria').enterFullscreen(function(){alert('full screen mode');})
alert('after');
}

the above function is called but nothing happens but if a try this code on firebug console

$('#galleria').data('galleria').enterFullscreen(function(){alert('full screen mode');})

it works smoothly what i am doing wrong thanks a lot.

1

There are 1 best solutions below

0
On

finally i could solved my issue using a xmhtml button in ZK and responding onClick event using JQuery i couldn't solve my issue using ZK button here is my code i hope i really helps somebody.

<div xmlns:h="xhtml">
   <h:button onclick="$('#galleria').data('galleria').toggleFullscreen();">Full Screen.          </h:button>
</div>

best regards..