Hi folks,
I have a very rough expand function here through jquery that works in codepend, however I'm having trouble getting it to work in my project. I'm using codekit with an normal setup of index.html, css.scss, script.js. Codekit is recognizing the file, but chrome inspector is showing a red arrow on the 3rd row... with
"Uncaught TypeError: Cannot set property 'scrollTop' of null"
@wraggen22, No I mean post the exact code you have in your html page (you can remove the links so no one knows the URL). It doesn't matter if it renders or not, I just want to see how you have it structured.
It did. Might you be able to recommend a cleaner type of js expand though? Not really liking how the text slides in from the left as the panel expands.
Hi folks, I have a very rough expand function here through jquery that works in codepend, however I'm having trouble getting it to work in my project. I'm using codekit with an normal setup of index.html, css.scss, script.js. Codekit is recognizing the file, but chrome inspector is showing a red arrow on the 3rd row... with "Uncaught TypeError: Cannot set property 'scrollTop' of null"
http://codepen.io/joe/full/rmeat
Any help is appreciated.
@wragen22
Edit: This may be a stupid question but some usually forget, are you calling jQuery in your page?
yes, buddy of mine we're exploring some designs. Yes jquery is being called.
@wragen22 I can't seem to replicate the issue. Are there other jQuery scripts that could be conflicting with this?
Hmm.. none others. Perhaps i'm calling it wrong?
Have this in my header " "
@wragen22 create a new pen on codepen so I can see what you're talking about.
I noticed that when I add the jquery in the head section, it doesn't work but if I add it just before the closing body tag, it does.
http://codepen.io/joe/full/rmeat
@wraggen22, No I mean post the exact code you have in your html page (you can remove the links so no one knows the URL). It doesn't matter if it renders or not, I just want to see how you have it structured.
Interesting... posted my html i have in my project to the codpen and js is not rendering.
Here is the updated codepen.
http://codepen.io/wragen22/full/sqrlD
@wragen22 That's how CodePen works. You only paste your content that's inside the body element. But I needed that to see how you're doing things.
Try removing this from your head section and placing it right before you closing body tag (< /body >).
That works! ... now why would that be the case?
@wragen22 I think it has to do with the way it loads the page. I hope this solved your issue. If not, we can troubleshoot further.
It did. Might you be able to recommend a cleaner type of js expand though? Not really liking how the text slides in from the left as the panel expands.
As in an accordion style expand? http://jqueryui.com/accordion/
hmmm...for some reason the current js I have when clicking to close - the background color disappears then slides up.
I'm trying to get to a model like this here. Where you click - expands nicely and closes when others are clicked.
http://www.mdlwebsolutions.com/blog/milo-lamar/jquery-animated-sliding-or-fading-hidden-elements
The very bottom one? I think @joshuanhibbert might be able to write you a custom one that works if he's around. I know very very little of jQuery.
Yes. @chrisburton - would be willing to gchat or google hangout?
Sure. GChat sounds good.