Krpano + html5 + JQuery

  • Hello,

    I have a div that contents an image.When we clic on the div, a pano replaces the image.
    I use JQuery to replace the content of my div.
    All works fine with the flash version of the Vtour. The Vtour starts in the div.
    But, with an html5 brother, nothing works. My div is empty...

    here is my javacsript function use to replace the content of the div "VirtualTour" :

    function showVTour()
    {
    $('#VirtualTour').empty();

    $("#VirtualTour").html('<div id="pani" style="width:701px; height:358px;">');

    var viewer = createPanoViewer({swf:"swf/krpano.swf",target:"pani"});
    viewer.addVariable("xml", "vtour.xml");
    viewer.embed();

    }

    Thanks for your help

    Via360

  • After some test, i have the same problem with this simple function :

    function showVTour(id,content) {
    var container = document.getElementById(id);
    container.innerHTML = content;

    var viewer = createPanoViewer({swf:"krpano.swf",target:"VirtualTour"});
    viewer.addVariable("xml", "tour.xml");
    viewer.embed();
    }

    In this cas, i don't use JQuery, so the probleme is elsewhere.
    When i look to the "activity window" on safari (user agent Ipad), i can see that the different elements of the vtour are right downloaded. But nothing is visible...
    Works fine in flash but the html5 mode don't play anything...

    Any idea ?

    Via360

  • Hi Klaus,

    Ok, I understand what do you write (i hope). *smile*
    But, i am not sure it's what happens to me.
    Please forget the second link and just take a look to the first :
    - if i use safari with "windows" as user agent, the vtour starts in flash when i push the button
    - if i use safari with "ipad" or "iphone" user agent, the vtour don't start (it shoulds start in html5 mode).
    Whithout the button and in a direct call, all works fine...
    Sorry if y miss something, but i discover in the same time javascript, php, xml, flash, so sometimes it's perhaps a bit confuse *wacko*

    Thanks a lot

    Via360

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!