//大多数功能都能够指定data属性来指定 但是,有必要的情况下使用jquery由于事件是不同的过程

//活动通常有两种状态show shown 通用和过去的





<!DOCTYPE html>

<html lang="en">





  <head>

    <title>Bootstrap 101 Template</title>

    <meta name="viewport" content="width=device-width, initial-scale=1.0">

    <!-- Bootstrap -->

    <link href="css/bootstrap.min.css" rel="stylesheet" media="screen">

    <link href="css/bootstrap-responsive.min.css" rel="stylesheet" media="screen">





      <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.0/jquery.min.js">

      </script>

      <script>

          $(document).ready(function(){

              $("p").click(function(){

                  $(this).hide();

              });

              //通过编写jquery 来展示效果,方法和事件的使用

              //$("#myModal").modal({show:true,backdrop:true});

              $('#myModal').on('shown', function () {

                  alert("hahjah");

              })

          });

      </script>





  </head>

  <body>





//通过data属性来查看效果

<!-- Button to trigger modal -->

<a href="#myModal" role="button" class="btn" data-toggle="modal">查看演示案例</a>

//指定data属性data-backdrop backdrop是一个可选參数。能够看文档还有非常多实用的属性

<button type="button" data-backdrop="false" data-toggle="modal" data-target="#myModal">Launch modal</button>

<!-- Modal -->

<div id="myModal"  class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">

    <div class="modal-header">

        <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>

        <h3 id="myModalLabel">Modal header</h3>

    </div>

    <div class="modal-body">

        <p>One fine body…</p>

    </div>

    <div class="modal-footer">

        <button class="btn" data-dismiss="modal" aria-hidden="true">关闭</button>

        <button class="btn btn-primary">Save changes</button>

    </div>

</div>

<p>假设您点击我。我会消失。</p>





<!--***************************************************************************-->

    <script src="http://code.jquery.com/jquery.js"></script>

    <script src="js/bootstrap.min.js"></script>

  </body>

</html>

版权声明:本文博主原创文章。博客,未经同意不得转载。

bootstrap使用汇总的更多相关文章

  1. GitHub托管BootStrap资源汇总(持续更新中…)

    Twitter BootStrap已经火过大江南北,对于无法依赖美工的程序员来说,这一成熟前卫的前端框架简直就一神器,轻轻松松地实现出专业的UI效果.GitHub上相关的的开源项目更是层出不穷,在此整 ...

  2. GitHub托管BootStrap资源汇总

    MESSENGER替换alert()消息和其他用户交互通知. JQUERY.TOCIFY.JS可以用Bootstrap或jQueryUI主题的Jquery表格组件. BOOTSTRAP-PROMPTS ...

  3. Bootstrap后台使用问题汇总(一)

    第一次自己汇总写博客啊,不懂规矩,大家包涵~~ 最近进行的项目中需要一个后台,于是在网上Down了许多Bootstrap后台源码.精挑细选决定用“ACE后台管理系统”(因为是中文的,英文三级狗的小鹿还 ...

  4. ***Bootstrap FileInput插件的使用经验汇总

    插件下载地址: https://github.com/kartik-v/bootstrap-fileinput/ 官方DEMO查看: http://plugins.krajee.com/file-ba ...

  5. 基于bootstrap的漂亮网站后台管理界面框架汇总

    基于bootstrap的漂亮网站后台管理界面框架汇总 10个最新的 Bootstrap 3 管理模板 这里分享的 10 个模板是从最新的 Bootstrap 3 管理模板集合中挑选出来的,可以帮助你用 ...

  6. Bootstrap 常用组件汇总

    Bootstrap 官方文档:http://www.bootcss.com/ Bootstrap Multiselect 多选下拉组件 官方文档:http://www.kuitao8.com/demo ...

  7. bootStrap table 和 JS 开发过程中遇到问题汇总

    1..bootStrap-table表头固定 在table定义的时候给高度属性就可以自动生成滚动条,并且固定表头[height: 220,] 2.为动态生成的DOM元素绑定事件 on("cl ...

  8. Bootstrap table分页问题汇总

    首先非常感谢作者针对bootstrap table分页问题进行详细的整理,并分享给了大家,希望通过这篇文章可以帮助大家解决Bootstrap table分页的各种问题,谢谢大家的阅读. 问题1 :服务 ...

  9. bootstrap学习笔记--bootstrap安装环境

    Bootstrap 安装是非常容易的.此文是本人的学习汇总,便于以后查询学习,同时也希望给大家带来帮助. 下载 Bootstrap 您可以从 http://getbootstrap.com/ 上下载 ...

随机推荐

  1. iOS开发人员必看的精品资料(100个)

    目录下载地址:http://down.51cto.com/data/416672 附件预览如下: iOS游戏开发之Unity3D引擎系列 http://down.51cto.com/zt/399 iP ...

  2. 利用SVNKit进行版本库的树的导出

    public List searchByTree(String userName,String passwd,String SVNServerUrl,String dirUrl){ //这里有点像 s ...

  3. 官方原版Windows XP SP3(VOL)中文简体版ISO下载

    今天,向各位朋友推荐今年五月,由MSDN官方集成的XP With SP3专业VOL版.    文 件:Windows XP Professional with Service Pack 3 (x86) ...

  4. jquery动态加入删除一行数据

    <html> <head> <title>加入.删除一行</title> <meta http-equiv="content-type& ...

  5. listary文件查找程序下载和使用

    资源:PHP开发学习门户网站 地址:http://bbs.phpthinking.com/forum.php?mod=viewthread&tid=173 Listary 是一款有用的国产Wi ...

  6. ASP.NET WebForm / MVC 源码分析

    浏览器 Url:https//localhost:6565/Home/Index ,https//localhost:6565/WebForm1.aspx,请求服务器(构建请求报文,并且将请求报文发送 ...

  7. Mysql insert声明优化

    1) 假设你同一时候从同一客户插入非常多行,使用多个值表的INSERT语句. 这比使用分开INSERT语句快(在一些情况中几倍).    Insert into test values(1,2),(1 ...

  8. Eclipse+Maven命令创建webapp项目<三>

    1.使用maven命令:mvn archetype:create -DgroupId=xxxxx -DartifactId=web-sample -DarchetypeArtifactId=maven ...

  9. J2SE习题(2)

    第四.五周练习题 1.a. Define a class called BlogEntry that could be used to store an entry for a  Weblog. Th ...

  10. Shrio登陆验证实例详细解读(转)

    摘要:本文采用了Spring+SpringMVC+Mybatis+Shiro+Msql来写了一个登陆验证的实例,下面来看看过程吧!整个工程基于Mavevn来创建,运行环境为JDK1.6+WIN7+to ...