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

Issue when using with WordPress jQuery #10

Open
wplit opened this issue Feb 1, 2021 · 7 comments
Open

Issue when using with WordPress jQuery #10

wplit opened this issue Feb 1, 2021 · 7 comments
Assignees
Labels
🐜 bug Something isn't working

Comments

@wplit
Copy link

wplit commented Feb 1, 2021

Only when using WordPress, there is an error when the skeletabs.js script is added to the page. This happens just by adding the script to the page.

skeletabs.js?ver=5.6:1 Uncaught TypeError: Cannot read property 'extend' of undefined

the browser console is pointing to this part of the code and afterward having issues..

classNames_classNames=$.extend({},defaults);

@wplit
Copy link
Author

wplit commented Feb 1, 2021

Example showing the issue in the browser console (the JS I just pasted in the jQuery followed by the skeletabs script)

https://codepen.io/wplit/pen/LYbEMYR

@findawayer findawayer self-assigned this Feb 2, 2021
@findawayer findawayer added the 🐜 bug Something isn't working label Feb 2, 2021
@findawayer
Copy link
Owner

Thank you for raising the issue!

It seems like we cannot reference jQuery at the time of skeletabs initialization. I will need to launch some tests to work around the issue; will get back to this as soon as I get time for it.

@findawayer
Copy link
Owner

Bumped a new version v2.1.3-alpha.0 with a fix to webpack configuration file. You can find a working demo with jQuery in WordPress build here.

@wplit @nickpish Please try the new version, if the issue persists in your specific setups, please leave a comment. I will leave this thread open for a while.

@nickpish
Copy link

nickpish commented Feb 2, 2021

@findawayer Wow, thanks for the quick turnaround! I will try it today and report back.

@nickpish
Copy link

nickpish commented Feb 2, 2021

@findawayer I can report your updated version is working w/ my WordPress project- thank you! On a different note- I'm seeing that when the panelHeight option is set to adaptive, the tab panel heights are incorrectly calculated when collapsed into accordion mode (I can post an example in a different thread if you think it's worthwhile.) Removing that setting in the options- and thus using the default auto- does not result in any height issues.

@findawayer
Copy link
Owner

@findawayer I can report your updated version is working w/ my WordPress project- thank you! On a different note- I'm seeing that when the panelHeight option is set to adaptive, the tab panel heights are incorrectly calculated when collapsed into accordion mode (I can post an example in a different thread if you think it's worthwhile.) Removing that setting in the options- and thus using the default auto- does not result in any height issues.

Glad to know it worked with your app! Skeletabs need a little more adjustments when it comes to a nested structure, like you just described so, I will take a look on the issue soon and try to find a solution. Please keep track of upcoming patches. 👊

@nickpish
Copy link

nickpish commented Feb 2, 2021

Will do! Thank you for putting together such a great plugin! I will certainly use it in other projects.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐜 bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants