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
Error Trying to Use Slideout Meteor package #31
Comments
Could you check your |
I tried to recreate your demo example exactly. Here's my code:
|
It's weird. Maybe @chriswessels can help you. |
@nicholasalanbrown Is by any chance the Slideout instance being created before the html is inserted into the DOM? |
Possibly. I was specifically following the instructions on Atmosphere which On Wed, Mar 11, 2015 at 4:33 PM Dan Zajdband notifications@github.com
|
Thanks for looping me in @pazguille. I think you're spot on @danzajdband. The example in the chriswessels:slideout docs works for very simple setups, but in a real world app things are likely to be a bit different (my bad, I'll update the docs!) due to routes rendering that may pause for subscriptions, etc. @nicholasalanbrown Try moving the Slideout initialisation script into the rendered hook in the template JS for the template that contains your menu DOM elements. Something like this: Template.mySlideoutMenu.rendered = function () {
var template = this;
var slideout = new Slideout({
'panel': template.$('.panel').get(0),
'menu': template.$('.menu').get(0),
'padding': 256,
'tolerance': 70
});
} Please let me know if this works for you! |
Thanks for getting back to me! No, I didn't have any luck with this. It gets rid of the error in the console, the "Menu" header is hidden, but clicking the button does nothing:
|
Hello:
I'm using the Meteor package version of Slideout and I get this error in my browser when the page loads:
It appears to come at slideout.min.js:1. Any ideas? The package is chriswessels:slideout
Thanks!
The text was updated successfully, but these errors were encountered: