JavaScript Modal dialog doesn't show [closed] modal dialog does not show,modal-dialog doesn't

Closed. This question needs to be more focused. It is not currently accepting answers.
Answer:1

Just add to your button the following two attributes data-target="#dialog-box" and data-toggle="modal" and it will work :

<button data-target="#dialog-box" data-toggle="modal" class="jobview-control btn-primary jobview-btn" id="btn-show-modal" >Recommend</button>

Hope this helps.

<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<link target='_blank' href="http://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/2.3.1/css/bootstrap.css" rel="stylesheet"/>
<script src="http://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/2.3.1/js/bootstrap.min.js"></script>
<button data-target="#dialog-box" class="jobview-control btn-primary jobview-btn" id="btn-show-modal" data-toggle="modal">Recommend</button>


<div class="modal fade" id="dialog-box">
  <div class="modal-header">
    <h2>Header</h2>
  </div>
  <div class="modal-body">
    <p>body body body</p>
  </div>
  <div class="modal-footer">
    <p>this is the Footer.</p>
  </div>
</div>
Answer:2

arr = Array(10).fill(false) arr[-2] = true console.log(arr) [false, false, false, false, false, false, false, false, false, false, -2: true] console.log(arr.length) // 10 I'm so surprised that ...

arr = Array(10).fill(false) arr[-2] = true console.log(arr) [false, false, false, false, false, false, false, false, false, false, -2: true] console.log(arr.length) // 10 I'm so surprised that ...

I have an ext:button. I want to trigger it's OnClick event by JavaScript based on the condition of a confirm message. My Button <ext:Button ID="btnAddEsya" Text="text" runat="server" Icon="Add" &...

I have an ext:button. I want to trigger it's OnClick event by JavaScript based on the condition of a confirm message. My Button <ext:Button ID="btnAddEsya" Text="text" runat="server" Icon="Add" &...

  1. triggering button click event in javascript
  2. triggering button click javascript
  3. triggering button click jquery

I would like to use the page scroll effect so that only the content of the #right element is scrolled in the layout. A similar effect can be seen on Facebook when scrolling posts (posts are scrolled ...

I would like to use the page scroll effect so that only the content of the #right element is scrolled in the layout. A similar effect can be seen on Facebook when scrolling posts (posts are scrolled ...

Alright, so my question is how I can add a prop to a component programmatically, here is my case, I have this in my render() for example: <TextField name="password" ...

Alright, so my question is how I can add a prop to a component programmatically, here is my case, I have this in my render() for example: <TextField name="password" ...

  1. jquery adding property to element