我非常喜欢jquery和所有这些.我只做一页专案,所以我迷路了.我需要显示iframe和弹出窗口.怎么做?
我试过bpopup:
index.html就像:
<button id="my-button">POP IT UP</button>
<!-- Element to pop up -->
<div id="element_to_pop_up">
<a class="b-close">x<a/>
Content of popup
</div>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
<script src="js/jquery.bpopup.min.js"></script>
<script src="js/jquery.easing.1.3.js"></script>
<script src="js/scripting.min.js"></script>
Run Code Online (Sandbox Code Playgroud)
并根据bpopup的主页我修改了jquery.bpopup.min.js
// Semicolon (;) to ensure closing of earlier scripting
// Encapsulation
// $ is assigned to jQuery
;(function($) {
// DOM Ready
$(function() {
// Binding a click event
// From jQuery v.1.7.0 use .on() instead of .bind()
$('#my-button').bind('click', function(e) {
// Prevents the default action to be triggered.
e.preventDefault(); …Run Code Online (Sandbox Code Playgroud)