2017-09-19 11 views

答えて

0

それは自身の研究の不足も1分でGoogleで検索されている可能性が何かであるので、私は、あなたの質問に答えるべきではありませんが、ここであなたが行く場合でも:

window.open(url, "name", "options"); 

Source

+0

私はそれをGoogleで検索しているが、あなたはその後、plsは私に言う答えがある場合haventはは、任意の解決策を見つけました。 – pradnya

+0

あなたは私の答えを試しましたか?これは、新しいウィンドウのような、ブラウザのポップアップを開きます。私は、私の答えにリンクを追加しました。 –

0

てみてくださいアップ

<a href="#popupVideo" data-rel="popup" data-position-to="window" class="ui-btn ui-corner-all ui-shadow ui-btn-inline">Launch video player</a> 
<div data-role="popup" id="popupVideo" data-overlay-theme="b" data-theme="a" data-tolerance="15,15" class="ui-content"> 
    <iframe src="http://player.vimeo.com/video/41135183?portrait=0" width="497" height="298" seamless=""></iframe> 
</div> 
この..

1)HTMLマーク

2)JS

// popup examples 
$(document).on("pagecreate", function() { 
    // The window width and height are decreased by 30 to take the tolerance of 15 pixels at each side into account 
    function scale(width, height, padding, border) { 
     var scrWidth = $(window).width() - 30, 
      scrHeight = $(window).height() - 30, 
      ifrPadding = 2 * padding, 
      ifrBorder = 2 * border, 
      ifrWidth = width + ifrPadding + ifrBorder, 
      ifrHeight = height + ifrPadding + ifrBorder, 
      h, w; 
     if (ifrWidth < scrWidth && ifrHeight < scrHeight) { 
      w = ifrWidth; 
      h = ifrHeight; 
     } else if ((ifrWidth/scrWidth) > (ifrHeight/scrHeight)) { 
      w = scrWidth; 
      h = (scrWidth/ifrWidth) * ifrHeight; 
     } else { 
      h = scrHeight; 
      w = (scrHeight/ifrHeight) * ifrWidth; 
     } 
     return { 
      'width': w - (ifrPadding + ifrBorder), 
      'height': h - (ifrPadding + ifrBorder) 
     }; 
    }; 
    $(".ui-popup iframe") 
     .attr("width", 0) 
     .attr("height", "auto"); 
    $("#popupVideo").on({ 
     popupbeforeposition: function() { 
      // call our custom function scale() to get the width and height 
      var size = scale(497, 298, 15, 1), 
       w = size.width, 
       h = size.height; 
      $("#popupVideo iframe") 
       .attr("width", w) 
       .attr("height", h); 
     }, 
     popupafterclose: function() { 
      $("#popupVideo iframe") 
       .attr("width", 0) 
       .attr("height", 0); 
     } 
    }); 
}); 

3. CSS

iframe { 
    border: none; 
} 
+0

OPが頼んだことを冗談にする方法。フィドルはいいかもしれない、たぶん私はそれを使用します:P –

+0

ありがとうraghavが、それは私が欲しいものではありません。 iframe(Youtube video)をクリックするとポップアップ(モーダル) – pradnya

関連する問題