Get Mega Bundle!14 Bootstrap, Vue & React Templates + 3 Vector Sets
Get for 99$

select2


I'm using Saul theme in an MVC application. select2 is not initiated. Based on the documentation it's bundled in the global plugin.
Everything work fine in the page that I'm working on it, but select2 is not initiated. I can see all the related javascript and css code in plugins.bundle.css and .js but it doesn't work. Can you help me fidn out what I'm missing?

In the intialization section I read that there are some SCSS files in sass folder. shoudl I import src folder to my solution as well?


Text formatting options
Submit
Here's a how to add some HTML formatting to your comment:
  • <pre></pre> for JS codes block
  • <pre lang="html"></pre> for HTML code block
  • <pre lang="scss"></pre> for SCSS code block
  • <pre lang="php"></pre> for PHP code block
  • <code></code> for single line of code
  • <strong></strong> to make things bold
  • <em></em> to emphasize
  • <ul><li></li></ul>  to make list
  • <ol><li></li></ol>  to make ordered list
  • <h3></h3> to make headings
  • <a></a> for links
  • <img> to paste in an image
  • <blockquote></blockquote> to quote somebody
  • happy  :)
  • shocked  :|
  • sad  :(

Replies (5)


Hi,

Can you double-check the original Saul HTML template as Select2 works fine there.

May I know which build method you are using? Gulp or Webpack? if you need any further help can you please share some screenshots using https://imgur.com/ where we can see the issue in your browser console?

Regards.



Thanks for your reply. Issue is fixed.



Hey Simon,

I am curious what your solution was? I am using the keen theme "Craft", but running into the same issue.

Cheers,
Ian



Hi Ian
You don't need to import any further library. Select2 must be initiated automatically by ~/assets/plugins/hlobal/plugins.bundle.js

Hope that help



Hi Ian,

You can find select2 usage examples in Craft documentation.

Regards,
Lauris Stepanovs,
Keenthemes Support Team


Text formatting options
Submit
Here's a how to add some HTML formatting to your comment:
  • <pre></pre> for JS codes block
  • <pre lang="html"></pre> for HTML code block
  • <pre lang="scss"></pre> for SCSS code block
  • <pre lang="php"></pre> for PHP code block
  • <code></code> for single line of code
  • <strong></strong> to make things bold
  • <em></em> to emphasize
  • <ul><li></li></ul>  to make list
  • <ol><li></li></ol>  to make ordered list
  • <h3></h3> to make headings
  • <a></a> for links
  • <img> to paste in an image
  • <blockquote></blockquote> to quote somebody
  • happy  :)
  • shocked  :|
  • sad  :(
Text formatting options
Submit
Here's a how to add some HTML formatting to your comment:
  • <pre></pre> for JS codes block
  • <pre lang="html"></pre> for HTML code block
  • <pre lang="scss"></pre> for SCSS code block
  • <pre lang="php"></pre> for PHP code block
  • <code></code> for single line of code
  • <strong></strong> to make things bold
  • <em></em> to emphasize
  • <ul><li></li></ul>  to make list
  • <ol><li></li></ol>  to make ordered list
  • <h3></h3> to make headings
  • <a></a> for links
  • <img> to paste in an image
  • <blockquote></blockquote> to quote somebody
  • happy  :)
  • shocked  :|
  • sad  :(
buy metronic

React Dev Vacancy

KeenThemes is looking for a Junior React or Vue developer to build awesome apps.
Apply