开发者

Video Problem With jQuery UI Dialog

On my website, I'm using a jQuery UI dialog box for some content, which includes video. However, one big problem. Whenever I close the dialog to reopen it (sometimes at the first run), the video downloads instead of plays.

Problems happen with all the players I tried (flowplayer, JW player, etc.). Either the aforementioned, or it doesn't load at all.

And I tried directly from the external page and it was fine, so it has to be a jQuery UI issue.

Is there a way around this? Anyone please? Thanks.

开发者_Go百科function openDialog(url) {
    $("<div class='popupDialog'>Loading...</div>")
        .dialog({
            autoOpen: false,
            closeOnEscape: true,
            width: '900',
            height: 'auto',
            modal: true,
            title: 'Bonus Features',
            autoResize: true,
            beforeClose: function(){   $(this).remove();   }
        }).bind('dialogclose', function() {
            jdialog.dialog('destroy');
        }).load(url, function() {
            $(this).dialog("option", "position", ['center', 'center'] ).bind('dialogopen', function() {
                    adjustJQueryDialogOverlay();
                });
                $(this).dialog("open");
        });
}

$(window).resize(function() {
    $(".ui-dialog-content").dialog("option", "position", ['center', 'center']);
});


use jquery nyromodal. it will solve all your video related problems.click to view nyromodal demo

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜