Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

$module.transition is not a function #1

Open
labkode opened this issue Jul 20, 2015 · 3 comments
Open

$module.transition is not a function #1

labkode opened this issue Jul 20, 2015 · 3 comments

Comments

@labkode
Copy link

labkode commented Jul 20, 2015

I am receiving this error when using semantic-ui-transition through browserify

Uncaught TypeError: $module.transition is not a function

My code is this:

var $ = require('jquery');
$.fn.dropdown = require("semantic-ui-dropdown");
$.fn.transition = require("semantic-ui-transition");
var Mn = require("backbone.Marionette");

module.exports = Mn.ItemView.extend({
        tagName: "div",
        attributes: {
            id: "header-app",
        },
        ui: {
            menu: ".ui .dropdown",
        },
        template: "#header-app-template",
        onShow:function() {
            this.ui.menu.dropdown();
        }
});
@cozuya
Copy link

cozuya commented Sep 3, 2015

So no one else has a denvercoder9, I resolved this (for the modal) by doing:

let $ = require('jquery'),
    Modal = require('semantic-ui-modal'),
    Dimmer = require('semantic-ui-dimmer'),
    Transition = require('semantic-ui-transition');

$.fn.transition = Transition;
$.fn.modal = Modal;
$.fn.dimmer = Dimmer;

So probably just an order thing.

@jlukic
Copy link
Member

jlukic commented Sep 3, 2015

This would occur if CSS transition is not defined. It checks before running animation.

@aullah
Copy link

aullah commented Sep 27, 2019

For anyone who finds this, if you're having similar issues when trying to only use the modal component in Semantic UI rather than the entire framework, the modal requires other dependencies (minified version is optional of course):

  • transition.min.js and transition.min.css
  • dimmer.min.js and dimmer.min.css
  • modal.min.js and modal.min.css

All the best.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants