{"id":6377,"date":"2014-04-17T01:13:31","date_gmt":"2014-04-17T01:13:31","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2014\/04\/17\/jquery-effects-slide-unexpected-delay-collection-of-common-programming-errors-2\/"},"modified":"2014-04-17T01:13:31","modified_gmt":"2014-04-17T01:13:31","slug":"jquery-effects-slide-unexpected-delay-collection-of-common-programming-errors-2","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2014\/04\/17\/jquery-effects-slide-unexpected-delay-collection-of-common-programming-errors-2\/","title":{"rendered":"JQuery Effects slide unexpected delay-Collection of common programming errors"},"content":{"rendered":"<p>The following code determines what the link target was sidebar or page and from that slides panels accordingly. The sidepanel ones work unison with the the visible sidepanel sliding out left sycronising with one sliding in from the right.<\/p>\n<p>The page ones however &#8216;main&#8217; do not. The left one slides out and the new plane slides in after a delay of around 300ms. This should not happen as the code is the same. Any ideas.<\/p>\n<pre><code>var panel = $('.sidewrapper:visible');\nvar panelnext = $('.sidewrapper:visible').next();\nvar paneltarget = $('.sidewrapper:visible').next().find('.sidescroller').children();\n\nvar page = $('.mainwrapper:visible');\nvar pagenext = $('.mainwrapper:visible').next();\nvar pagefirst = $('.mainwrapper:visible').first();\nvar pagetarget = $('.mainwrapper:visible').next().find('.mainscroller').children();\n\nif (target == 'sidebar') {\n    $(paneltarget).html(data.sidepanel);\n    $(panel).hide('slide', { direction: 'left' }, 300); $(panelnext).show('slide', { direction: 'right' }, 300);\n    }\n    else if (target == 'page') {\n    $(pagefirst).find('.mainscroller').children().html(data.sidepanel);\n    $(page).hide('slide', { direction: 'left' }, 300); $(pagefirst).show('slide', { direction: 'right' }, 300);\n    }\n<\/code><\/pre>\n<p>Any ideas,<\/p>\n<p>Marvellous<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The following code determines what the link target was sidebar or page and from that slides panels accordingly. The sidepanel ones work unison with the the visible sidepanel sliding out left sycronising with one sliding in from the right. The page ones however &#8216;main&#8217; do not. The left one slides out and the new plane [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-6377","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/6377","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=6377"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/6377\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=6377"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=6377"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=6377"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}