利用jquery实现伸缩拖拽弹出框



69 274 92



特效描述:利用jquery实现 伸缩拖拽 弹出框,利用jquery实现伸缩拖拽弹出框

代码结构

1. 引入CSS

<link rel="stylesheet" type="text/css" href="stylesheets/style.css"/>

2. 引入JS

<script type="text/javascript" src="javascripts/top_up-min.js"></script>

3. HTML代码

		<div id="page_background"></div>
		<div id="page_wrapper">
      <div id="page_header" onClick="document.location.href = 'http://51qianduan.com'">
        <h2>TopUp</h2>
        <h1>The #1 Javascript Pop Up made by Paul Engel</h1>
      </div>
			<div id="page_content">
			  <h1 class="thanks_for_download_top_up">Thanks for downloading TopUp!</h1>
			  <p>
			    You must be thinking: "Great, I've downloaded TopUp! But now what?". No need to worry, this download is provided with examples and instructions regarding the usage of the library.
			  </p>
			  <h1 class="some_examples">Some examples</h1>
			  <div id="examples">
  			  <span id="images">
            <a href="images/photos/1.jpg" toptions="overlayClose = 1">
              <img src="images/thumbnails/1.jpg"/>
            </a>
            <a href="images/photos/2.jpg" toptions="noGroup = 1, layout = dashboard">
              <img src="images/thumbnails/2.jpg"/>
            </a>
            <a href="images/photos/3.jpg" toptions="effect = appear, layout = quicklook">
              <img src="images/thumbnails/3.jpg"/>
            </a>
            <a href="images/photos/by-ben-adamson.jpg" toptions="effect = clip, layout = quicklook">
              <img src="images/thumbnails/by-ben-adamson.jpg"/>
            </a>
          </span>
          <span>
            <a href="http://www.51qianduan.com//v/pv8j1-IcnUE&amp;hl=nl&amp;fs=1&amp;rel=0&amp;hd=1&amp;autoplay=1" toptions="width = 853, height = 505, type = flash, title = Beastie Boys - Sabotage">
              <img src="images/thumbnails/youtube.jpg"/>
            </a>
            <a href="http://www.51qianduan.com//0/31_tupac.swf" toptions="width = 550, height = 400, title = How Mr. T killed Tupac, effect = clip">
              <img src="images/thumbnails/swf.jpg"/>
            </a>
            <a href="http://gettopup.com/media/brucelee.flv" toptions="width = 425, height = 344, title = Bruce Lee - Like Water">
              <img src="images/thumbnails/flv.jpg"/>
            </a>
            <a href="http://www.51qianduan.com//movies/wb/the_dark_knight/the_dark_knight-tlr2-h.ref.mov" toptions="width = 480, height = 220, title = The Dark Knight, layout = quicklook, shaded = 1">
              <img src="images/thumbnails/quicktime.jpg"/>
            </a>
          </span>
        </div>
			  <br>
			  <h3>When including from gettopup.com (the easiest setup)</h3>
			  <p class="intro">
			    I have put a lot of examples in the <a href="1. Single links/1. TopUp classes.html">examples</a> directory. They are all implemented with this setup.
			  </p>
        <ol>
          <li>
            Put the following in the <span class="code">head</span> element:
            <div class="box code">
              &lt;script type="text/javascript" src="">&lt;/script>
            </div>
            <small>
              <strong>Note: You can configure TopUp (libs, <a href="http://51qianduan.com">fast mode</a>, paths) in the querystring of the URL (read <a href="http://51qianduan.com">documentation</a>)</strong>
            </small>
            <div class="top_padded">
              ( you can also include a specific release by replacing <span class="code">latest</span> with the version e.g. <span class="code">1.3.2</span> )
            </div>
          </li>
        </ol>
        <h3>When hosting the Javascript and images yourself</h3>
			  <p class="intro">
			    Please note that this page is implemented with this setup. I assume hosting TopUp will not be a problem.
			  </p>
        <ol>
          <li>
            Copy the entire(!) <strong>jquery</strong> directory in the same directory as the TopUp Javascript file. TopUp will automatically determine which Javascript libraries
            (jQuery and/or jQuery UI) to include from the <strong>jquery</strong> directory when missing.
            Please note that TopUp will only include <strong>one</strong>(!) file to reduce the amount of HTTP requests! An include will look like this:
            <div class="box code">
              &lt;script type="text/javascript" src="path/to/your/jquery/*.js">&lt;/script>
            </div>
          </li>
          <li>
            Copy the entire(!) <strong>images</strong> directory to the correct location.
            At default, TopUp assumes that the images reside at the same host as the file itself in the following path <span class="code">/images/top_up/</span>.
            You can change the path (and even the host) by changing the variables <span class="code">TopUp.host</span> and <span class="code">TopUp.images_path</span> as the following:
            <div class="box code">
              &lt;script type="text/javascript"><br>
              &lt;/script>
            </div>
            <small>
              <strong>Note:&nbsp; The proper place for Rails developers would be the <span class="code">application.js</span></strong>
            </small>
          </li>
          <li>
            Copy the entire(!) <strong>players</strong> directory to the correct location.
            At default, TopUp assumes that the players reside at the same host as the file itself in the following path <span class="code">/players/</span>.
            You can change the path and host by changing the variables <span class="code">TopUp.host</span> and <span class="code">TopUp.players_path</span> as the following:
            <div class="box code">
              &lt;script type="text/javascript"><br>
              &nbsp; TopUp.players_path = "assets/players/";<br>
              &lt;/script>
            </div>
            <small>
              <strong>Note:&nbsp; The proper place for Rails developers would be the <span class="code">application.js</span></strong>
            </small>
          </li>
          <li>
            Now you start using TopUp on your webpages by putting the following in the <span class="code">head</span> element:
            <div class="box code">
              &lt;script type="text/javascript" src="path/to/your/top_up-min.js">&lt;/script>
            </div>
            <small>
              <strong>Note: You can configure TopUp (libs, <a href="http://51qianduan.com">fast mode</a>, paths) in the querystring of the URL (read <a href="http://51qianduan.com">documentation</a>)</strong>
            </small>
          </li>
        </ol>
        <p>
          Remember: You can still use <strong><a href="http://51qianduan.com">Prototype</a></strong> without having conflicts, just make sure you include TopUp first.
        </p>
      </div><br>
    </div>
<div style="text-align:center;clear:both">
</div>



用户评论
大牛,别默默的看了,快登录帮我点评一下吧!:)      登录 | 注册


热门标签: 瀑布流 收藏 预览 自适应页面大小 响应式区块列表布局 摇摆 烟花 清单样式 照相机 注释 下划线 结构图 鼠标悬停 条形码 弹幕 画板 朋友圈样式 红包 css绘制样式 支付 图文布局 右键菜单 图片放大镜 图片淡出淡进 图片头像上传 二维码 文字提示框 文字放大缩小 图片放大缩小 文字淡出淡进 文件上传 地图 数字放大缩小 提示框/弹出层 文本框 计算器 layer 下拉框 计时器 lightbox 复选 桌面 单选 跳转 Tooltip工具提示框 登录框 步骤 浮动提示框 注册框 键盘 html5弹窗动画 搜索框 签到 验证码 分享 二级联动 点赞 投票 三级联动 雪花 城市选择 打印 value赋值 筛选 答题 按钮控制 购物车 震动 颜色选择 表单提交 全选/反选 图表 添加删除 鼠标滑过 添加标签 抽奖 密码强度验证 表情 表单验证 qq空间 头像截图 html5按钮动画 星星打分评分 按钮样式 密码修改设置 编辑器 播放器 电子杂志 排行榜 分页翻页 排序 表格隔行变色 table表格 进度条 多功能 弹出层拖动 窗口提示框 滑动星星打分 缩放放大缩小 渐隐切换 淡出淡入淡进 切换按钮 缩放切换 form表单 其他更多

×
×

注册

官方QQ群

扫描上面二维码加微信群

官方QQ群

jQuery/js讨论群
群号:642649996
Css3+Html5讨论群
群号:322131262

加群请备注:从官网了解到