Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/468.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/python-2.7/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript 在scalajs react中隐藏警报_Javascript_Twitter Bootstrap_Alert_Scalajs React - Fatal编程技术网

Javascript 在scalajs react中隐藏警报

Javascript 在scalajs react中隐藏警报,javascript,twitter-bootstrap,alert,scalajs-react,Javascript,Twitter Bootstrap,Alert,Scalajs React,我使用的是scalajs react,我想隐藏引导警报,而不是将其从DOM中删除。 我找到了这个javascript代码 $('.alert.close')。打开('click',函数(){ $(this.parent().hide(); })我只是在on()方法中缺少一个选择器。 解决办法是: jQuery(scope.getDOMNode()).on("click", ".close", null, Alert.closed _)

我使用的是scalajs react,我想隐藏引导警报,而不是将其从DOM中删除。 我找到了这个javascript代码

$('.alert.close')。打开('click',函数(){
$(this.parent().hide();

})
我只是在on()方法中缺少一个选择器。 解决办法是:

jQuery(scope.getDOMNode()).on("click", ".close", null, Alert.closed _)