A couple of things aren't working properly on my site—and since I'm new to writing jQuery I'm a bit mystified at what's going wrong.
ProblemI've got several links using the "sliderDiv" class, which should toggle the attached sliding function. However, the only link that works properly is the one in the sticky-footer. If you click "Contact", or "Featured Homes" in the navigation, you'll see what's not working properly. Also, if you attempt to close the slider by clicking the logo after the slider has opened, more of the same error occurs. Please help! (link provided below)
Also! I would like to get rid of the scrolling (scrollbars) when the slide happens; it makes the interaction kind of clunky.
*Note: Ideally, I had wanted this to function like the
Helveticons site, but because of more complex background images, ended up with the current functionality.
I will gladly accept suggestions for improvement in interaction.
- $(".toggle").toggle(function(){
- $(this).toggleClass("active");
- $("#featured").slideToggle("slow");
- $("#viewport").fadeOut("slow");
- return false;
- }, function() {
- $(this).toggleClass("active");
- $("#featured").slideToggle("slow");
- $("#viewport").fadeIn("fast");
- return false;
- });
As seen on its development version:
http://clients.periscopecreative.com/bethkellan.com/