admin管理员组文章数量:1026989
I am using bootstrap-modal from :
modalEl is the modal element in DOM. Modal is pletely rendered in the with some dynamic content.
I want to hide the modal, do some work on application and would like to render that same modal later again without initialising the any new modal.
How do i do that???
I have removed data-dismiss="modal"
attribute from the button.
but the following not working in my case
$(modalEl).modal('hide');
$(modalEl).modal('show');
I am using bootstrap-modal from :
https://github./jschr/bootstrap-modal
modalEl is the modal element in DOM. Modal is pletely rendered in the with some dynamic content.
I want to hide the modal, do some work on application and would like to render that same modal later again without initialising the any new modal.
How do i do that???
I have removed data-dismiss="modal"
attribute from the button.
but the following not working in my case
$(modalEl).modal('hide');
$(modalEl).modal('show');
Share
Improve this question
edited Nov 30, 2013 at 7:39
codeofnode
asked Nov 30, 2013 at 7:28
codeofnodecodeofnode
18.7k30 gold badges88 silver badges146 bronze badges
2
- what do you mean by "not working"? What steps have you taken to debug the problem? – Stephen Thomas Commented Nov 30, 2013 at 14:45
- sorry i was using default approach of twitter bootstrap while using bootstrap-modal.js from different vender. – codeofnode Commented Nov 30, 2013 at 19:49
1 Answer
Reset to default 3'bootstrap-modal.js' provided from https://github./jschr/bootstrap-modal is at least little different if pared from the default modal provided from twitter bootstrap.
for the modal root div (here taken as modalEl)
to show hide default twitter bootstrap we use :
$(modalEl).modal(); // initialize
$(modalEl).modal('hide'); // hide
$(modalEl).modal('show'); //show
However if we use modal from https://github./jschr/bootstrap-modal we should use the following way :
var modalObj = $(modalEl).modal(); // initialize
modalObj.modal('hide') // to hide
modalObj.modal('show') // show
I am using bootstrap-modal from :
modalEl is the modal element in DOM. Modal is pletely rendered in the with some dynamic content.
I want to hide the modal, do some work on application and would like to render that same modal later again without initialising the any new modal.
How do i do that???
I have removed data-dismiss="modal"
attribute from the button.
but the following not working in my case
$(modalEl).modal('hide');
$(modalEl).modal('show');
I am using bootstrap-modal from :
https://github./jschr/bootstrap-modal
modalEl is the modal element in DOM. Modal is pletely rendered in the with some dynamic content.
I want to hide the modal, do some work on application and would like to render that same modal later again without initialising the any new modal.
How do i do that???
I have removed data-dismiss="modal"
attribute from the button.
but the following not working in my case
$(modalEl).modal('hide');
$(modalEl).modal('show');
Share
Improve this question
edited Nov 30, 2013 at 7:39
codeofnode
asked Nov 30, 2013 at 7:28
codeofnodecodeofnode
18.7k30 gold badges88 silver badges146 bronze badges
2
- what do you mean by "not working"? What steps have you taken to debug the problem? – Stephen Thomas Commented Nov 30, 2013 at 14:45
- sorry i was using default approach of twitter bootstrap while using bootstrap-modal.js from different vender. – codeofnode Commented Nov 30, 2013 at 19:49
1 Answer
Reset to default 3'bootstrap-modal.js' provided from https://github./jschr/bootstrap-modal is at least little different if pared from the default modal provided from twitter bootstrap.
for the modal root div (here taken as modalEl)
to show hide default twitter bootstrap we use :
$(modalEl).modal(); // initialize
$(modalEl).modal('hide'); // hide
$(modalEl).modal('show'); //show
However if we use modal from https://github./jschr/bootstrap-modal we should use the following way :
var modalObj = $(modalEl).modal(); // initialize
modalObj.modal('hide') // to hide
modalObj.modal('show') // show
本文标签: javascript(modalEl)modal(39show39) and (modalEl)modal(39hide39) not workingStack Overflow
版权声明:本文标题:javascript - $(modalEl).modal('show') and $(modalEl).modal('hide') not working - Stack Overflow 内容由热心网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://it.en369.cn/questions/1745499633a2153328.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论