Would be nice to have the hard coded jQuery 2.0.3 removed from webflow.js (smooth scrolling/form submit effect) and make it an option in the dashboard to include the core library (latest from CDN) in the head section, i.e. check boxes for common libraries, also when checking the option for smooth scrolling, a dialog pops up stating that this will automatically include the jQuery library. That way we can include our own scripts that use the library without having to duplicate it or add it post export. As of right now I tried adding the following in a script element (to un-hide a section on button click) but jQuery is not defined because it is not global.
Also I don’t understand the concept here… You want to click on a form container that appears to be hidden to show it but… How can you click something that is hidden?
Edited for clarity: It doesn’t work that way as jQuery is not included as a global function in webflow.js, (feel free to try it, its a self-invoking function only usable in webflow.js) and no, the “on” method doesn’t work that way either, its backwards from the deprecated but still supported .click event, the target is defined first, the event handler is the button element that is clicked, defined after the event type.
Oh, it makes more sense if you know the button is not within the hidden .form-container, here is an example of a hidden form I did post webflow export but now that we have an embed element I wanted to try giving my clients a nice preview experience before the dissection and coding process -http://murrietavalleychoir.com/
Nice one But that “Still writing our perfect song, check back soon.” should be less distractive. And shouldn’t need any user interaction (click button) to close it). Try to give it a clean look somewhere where it will be an information rather than popup. That’s just my suggestion The contact is very nice. I still like to use CSS instead of jQuery for effects if I can since CSS has “more fps” than jQuery. That’s just my suggestion Maybe you could use css opacity + z-index + ease in&out instead of fadeIn/Out?
Thanks for the feedback, I also prefer css animations over js but 2 main reasons, lack of current ability to use parent or another element as the trigger (coming soon hopefully) and 2 the dreaded IE and lack of support for css3 animations, IE8 and some even in IE9. If it was simply for effect, no biggie, IE users miss out but since its a modal (one-page) type design js is the fallback for now.
Additionally, as @bartekkustra suggested, this could also be a way to add css transitions to an element via another elements action or state by simply using js to add and remove classes.
I agree with @pingram3541. As we need extensive js script for things like “scroll down to refresh” or slide galeries, my dev coders says it’s pain to have JQuery hard coded.
I personnally don’t care but for bigger project, with e-coomerce, multi language, blogs, it does matter.
This might not be related, but I get errors unless I re-include the jquery library…and when I do re-include it, the page obviously gets past the problem of not having $ or jQuery defined. But I am wondering if the error generated by my code below is caused by some kind of conflict. (error is “Uncaught TypeError: Object [object Object] has no method ‘iosSlider’”)
Sorry, I neglected to put code in the code formatting, but when I try to edit my post, it won’t let me re-post so similarly.
Hi all! Just to update you on this issue, jQuery has been separated from webflow.js in both published and exported sites. Both script tags are being inserted before the closing </body> tag.
More JavaScript guidelines can be found in this post.