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

$(...).sidebar is not a function #122

Closed
Guillaumejfrt opened this issue Nov 22, 2017 · 5 comments
Closed

$(...).sidebar is not a function #122

Guillaumejfrt opened this issue Nov 22, 2017 · 5 comments

Comments

@Guillaumejfrt
Copy link

Hi,

I've been using gem semantic-ui-sass for several months and my sidebar has always toggled perfectly. However, it doesn't work anymore. JS in the console says $(...).sidebar is not a function. I don't understand is going wrong. Here is my code in my js file:

$("#ui-sidebar").sidebar("attach events", ".sidebar-item");

Could you help me?

Thanks

@doabit
Copy link
Owner

doabit commented Nov 22, 2017

image
I tested and it seems work, could you paste your sample code?

@Guillaumejfrt
Copy link
Author

Yes the the selector $("#ui-sidebar") do work. It's the semantic function .sidebar() which is not working.

I am not sure to understand which part of my code you want to see. Do you want me to send the html part?

@doabit
Copy link
Owner

doabit commented Nov 22, 2017

This is my javascript code:

//= require rails-ujs
//= require turbolinks
//= require jquery
//= require semantic-ui

and this is html

<div id="ui-sidebar">
  <div class="sidebar-item">demo</div>
</div>

@Guillaumejfrt
Copy link
Author

Guillaumejfrt commented Nov 22, 2017 via email

@doabit
Copy link
Owner

doabit commented Nov 22, 2017

Please paste your layout code, and where the $("#ui-sidebar").sidebar("attach events", ".sidebar-item"); code you put.

@doabit doabit closed this as completed Jan 20, 2018
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

2 participants