Smort
Smort

Reputation: 428

Semantic UI Popup doesn't open

I'm making my first steps with Semantic UI and even got the first problems I can't fix.

I just want to create a simple popup trigger like here http://semantic-ui.com/modules/popup.html#specifying-a-trigger-event . I've tried to copy and paste the .html and .js code and also inlcuded the semantic.min.js and semantic.min.css in the page header, but it doesn't open the popup for whatever reason.

Here's the html code I use:

<div class="ui singleImg container">
    <div class="ui hidden divider"></div>
    <div class="ui two column stackable grid">
      <div class="eleven wide column">
          <h1 class="ui dividing header">Test</h1>
      </div>
      <div class="five wide column">
        <div class="ui teal button" data-title="Using click events" data-content="Clicked popups will close if you click away, but not if you click inside the popup">Download</div>
        Sidebar
      </div>

    </div>
</div>

And before </body> I've also added the following .js code:

<script>
    $('.teal.button')
      .popup({
        on: 'click'
      })
    ;
</script>

//Update: Created a fiddle here: https://jsfiddle.net/w46ynjwu/

Upvotes: 3

Views: 2090

Answers (1)

Siddharth
Siddharth

Reputation: 869

there is a problem in your code you did not add jquery.

here is a (almost)same fiddle working fine

<script>//no need of this tag in jsfiddle
</script>

Upvotes: 1

Related Questions