Note that there are some explanatory texts on larger screens.

plurals
  1. PO.show and .animate at the same time?
    primarykey
    data
    text
    <p>I have a nav which you can see here: <a href="http://hutchcreative.co.uk/rod/" rel="nofollow">http://hutchcreative.co.uk/rod/</a>. If you click on the menu icon and then contact you can see the icon changes to a X. I would like to add an animation on this, instead of using .hide() and .show(). However whenever I have added .animate it doesn't seem to apply. Does this mean I cannot replace .show() with .animate? Do i have to combine the 2 somehow?</p> <p>I have posted my jquery below:</p> <pre><code>$('#menuIcon').toggle(function(){ $('#navigationWrapper ul').show(); $("#navigationWrapper").addClass('activenav'); }, function(){ $('#navigationWrapper ul').hide(); $("#navigationWrapper").removeClass('activenav whiteSection'); }); $('#navigationWrapper #menu-item-59').click(function(){ if($("#navigationWrapper").hasClass('whiteSection')){ $('#contactWrapper').slideUp("slow"); $("#navigationWrapper").removeClass('whiteSection').addClass('activenav'); $('#menuIcon').animate({ opacity: "show" }, { duration: "slow", easing: "easein" }); $('#closeIcon').hide(); } else{ $('#contactWrapper').slideDown("slow"); $("#navigationWrapper, #navBlog").addClass('whiteSection'); $('#menuIcon').hide(); $('#closeIcon').animate({ opacity: "show" }, { duration: "slow", easing: "easein" }); } }); $("#closeIcon").click(function () { $('#contactWrapper').slideUp("slow"); $('#menuIcon').animate({ opacity: "show" }, { duration: "slow", easing: "easein" }); $('#closeIcon').hide(); $("#navigationWrapper, #navBlog ").removeClass('whiteSection').addClass('activenav'); }); $('#navBlog #menu-item-59').click(function(){ if($("#navBlog").hasClass('whiteSection')){ $('#contactWrapper').slideUp("slow"); $("#navBlog").removeClass('whiteSection').addClass('activenav'); $('#menuIcon').animate({ opacity: "show" }, { duration: "slow", easing: "easein" }); $('#closeIcon').hide(); } else{ $('#contactWrapper').slideDown("slow"); $("#navBlog").addClass('whiteSection'); $('#menuIcon').hide(); $('#closeIcon').animate({ opacity: "show" }, { duration: "slow", easing: "easein" }); } }); </code></pre> <p>The look im trying to achieve is when you click on contact the menu icon slides up and the X slides up from the bottom, so it looks like it is pushing it out of the way basically.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload