zoukankan      html  css  js  c++  java
  • bootstrap panel同时展开多个 vscode view in browser插件不好用

    panel能同时展开有个data-parent属性  但是会有个小bug  

    这样默认可以自动折叠,但是项目遇到问题不能折叠的话

    // 初始化数据
    $(document).on('click', '.collapse-toggle', function(event) {
    event.stopPropagation();
    var $this = $(this);
    var parent = $this.data('parent');
    var actives = parent && $(parent).find('.collapse.in');
    // From bootstrap itself
    if (actives && actives.length) {
    hasData = actives.data('collapse');
    if (hasData && hasData.transitioning) return;
    actives.collapse('hide');
    }
    var target = $this.attr('data-target') || (href = $this.attr('href')) && href.replace(/.*(?=#[^s]+$)/, ''); //strip for ie7
    $(target).collapse('toggle');

    });
    这里大概思路就是阻止bt里默认的js事件触发,然后利用点击事件自己处理.collapse.in类的事件。

    view in browser 不好用  

      在命令里设置,搜索前边的key 更改后边的val为浏览器名称

      "view-in-browser.customBrowser": "chrome"

    转盘抽奖转盘动画效果 慢-快-慢

    https://www.cnblogs.com/interstellar/p/6562446.html 

    打开之后复制function之后的源码放到easing方法上即可实现。
    例如:

    easing: function (x, t, b, c, d) {
    if ((t/=d/2) < 1) return c/2*t*t + b;
    return -c/2 * ((--t)*(t-2) - 1) + b;
    },

    bootstrap 模态框调用代码多次执行
      第一种:把事件放到click事件外去定义

     解释:https://segmentfault.com/q/1010000009074364 

    button按钮自动提交form表单  
      如果点击button的时候不想提交表单,在button按钮上添加type=“button”,然后$("#form").submit();

  • 相关阅读:
    《网络是怎样连接的》读书笔记一
    移植mplayer到开发板
    解决ubuntu安装ssh服务无法打开解析包问题
    嵌入式软件工程师面经
    c语言-数组、指针面试题
    Linux命令- echo、grep 、重定向、1>&2、2>&1的介绍
    回调函数的作用
    数据结构-单链表回环函数判断
    算法-一步步教你如何用c语言实现堆排序(非递归)
    算法-快速排序
  • 原文地址:https://www.cnblogs.com/xiaoyaoweb/p/8615353.html
Copyright © 2011-2022 走看看