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

Packages with different CSS and JS #826

Closed
zekitow opened this issue May 5, 2014 · 3 comments
Closed

Packages with different CSS and JS #826

zekitow opened this issue May 5, 2014 · 3 comments

Comments

@zekitow
Copy link

zekitow commented May 5, 2014

Hi,

I've been used semantic ui and some examples doesn't work as the expected.

To have the expected behavior, I had to download the semantic.css and semantic.js directly from the source code of documentation page, instead of the .zip content.

Thanks for the great job!
Keep coding!

Cheers,
Zekitow

@ProjectCleverWeb
Copy link

I get the feeling that you may have misunderstood how to use Sematic UI's JS. With Semantic, behaviors are not automatically applied to elements. Instead, you must tell Semantic where to apply behaviors. The benefit of this is you can use different identifiers and apply different settings.

Example:

Lets say that I want to have 3 types of dropdowns on my site, some that open when clicked, some that open when hovered over, and a few that should not be used by Semantic.

I would achieve this with the following JS:

$('.ui.menu').dropdown();
$('.ui.hover.menu').dropdown({ on: 'hover' });
$('.other.menu').doSomething();

The reason why some of you behaviors worked when you used semantic.js is because that file contains both the Semantic UI js library, and code specific to the site. (including the code that applies behaviors to elements on that site)

@zekitow
Copy link
Author

zekitow commented May 5, 2014

Sorry, for my sort post.

But I had a problem with "downloadable" version using modals, on ElementaryOS Chrome.

For example, I had a button and when I click it, the modal opens normally. But at the second time, the modal does not open centralized anymore (it works only when I force a resize, manually, that triggers the modal position again).

Got it?

@jlukic
Copy link
Member

jlukic commented May 6, 2014

Sounds like #622 #614

Please, create a JSFiddle (fork the link in the readme) that shows the unexpected behavior. And please list the exact version of Chrome on ElementaryOS.

Thank you

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

No branches or pull requests

3 participants