小编Fad*_*hil的帖子

Disable bootstrap switch after onswitchchange

I am new at coding with bootstrap and jquery. how can i disable bootstrap switch in "onswitchchange" method option

Here my javascript/jquery code:

$("input[type=checkbox]").bootstrapSwitch({
    size:"mini",
    onSwitchChange:function(event, state) {
      this.disabled = true; //checkbox change into disabled
    }
  });
Run Code Online (Sandbox Code Playgroud)

i also tried to change this.disabled = true into $(this).setDisabled(true); and it returning error of course. i just want to know how to call setDisable method inside onswitchchange method. if it cannot be like that. is there any other way to disable the …

javascript jquery twitter-bootstrap bootstrap-switch

5
推荐指数
1
解决办法
4709
查看次数

使用 Git Bash 上的最后一个工作目录恢复集成终端会话

通常当我们退出终端并重新打开它时,它会恢复我们的终端和选项卡,这是一个很好的功能,但是它也可以恢复我们最后的cwd吗?我认为应该可以,但我无法让它在我的终端上运行。

会话不保存我最后的工作目录 在此输入图像描述

它说session contents restored

之前的目录是.../shop/shop-next,但恢复后它只是.../shop

我希望恢复后和之前一样 ( .../shop/shop-next)

相关设置是:

在此输入图像描述关于设置“持久会话恢复过程”,它说恢复CWD取决于终端是否支持

我不知道 git bash 是否支持此功能,所以这是我的问题:

  1. 有没有办法完成它?(不使用扩展)
  2. 什么终端/配置文件/bash 支持此功能。

terminal git-bash visual-studio-code

5
推荐指数
1
解决办法
815
查看次数