{"id":1890828,"date":"2011-01-31T17:38:05","date_gmt":"2011-01-31T17:38:05","guid":{"rendered":"https:\/\/wordpress.org\/support\/topic\/fade-slide-show-and-navigation\/"},"modified":"2016-08-19T22:21:10","modified_gmt":"2016-08-19T22:21:10","slug":"fade-slide-show-and-navigation","status":"closed","type":"topic","link":"https:\/\/wordpress.org\/support\/topic\/fade-slide-show-and-navigation\/","title":{"rendered":"Fade slide show and navigation"},"content":{"rendered":"<p>Hello i&#8217;m having a horizontal navigation in the header with a fading slideshow.<br \/>\nMy problem is that the slideshow go over the navigation&#8230; i can&#8217;t see my sub menu<\/p>\n<p>Is there a way that my nav bar always go on top of my slideshow?<\/p>\n<p>Sorry for my english i&#8217;m french!<\/p>\n<p>Here are my code<\/p>\n<pre><code>&lt;!DOCTYPE html&gt;\n&lt;html &lt;?php language_attributes(); ?&gt;&gt;\n\n&lt;head&gt;\n\t&lt;meta charset=&quot;&lt;?php bloginfo(&#039;charset&#039;); ?&gt;&quot; \/&gt;\n\n\t&lt;?php if (is_search()) { ?&gt;\n\t   &lt;meta name=&quot;robots&quot; content=&quot;noindex, nofollow&quot; \/&gt;\n\t&lt;?php } ?&gt;\n\n\t&lt;title&gt;\n\t\t   &lt;?php\n\t\t      if (function_exists(&#039;is_tag&#039;) &amp;&amp; is_tag()) {\n\t\t         single_tag_title(&quot;Tag Archive for &quot;&quot;); echo &#039;&quot; - &#039;; }\n\t\t      elseif (is_archive()) {\n\t\t         wp_title(&#039;&#039;); echo &#039; Archive - &#039;; }\n\t\t      elseif (is_search()) {\n\t\t         echo &#039;Search for &quot;&#039;.wp_specialchars($s).&#039;&quot; - &#039;; }\n\t\t      elseif (!(is_404()) &amp;&amp; (is_single()) || (is_page())) {\n\t\t         wp_title(&#039;&#039;); echo &#039; - &#039;; }\n\t\t      elseif (is_404()) {\n\t\t         echo &#039;Not Found - &#039;; }\n\t\t      if (is_home()) {\n\t\t         bloginfo(&#039;name&#039;); echo &#039; - &#039;; bloginfo(&#039;description&#039;); }\n\t\t      else {\n\t\t          bloginfo(&#039;name&#039;); }\n\t\t      if ($paged&gt;1) {\n\t\t         echo &#039; - page &#039;. $paged; }\n\t\t   ?&gt;\n\t&lt;\/title&gt;\n\n\t&lt;link rel=&quot;shortcut icon&quot; href=&quot;\/favicon.ico&quot;&gt;\n\n\t&lt;link rel=&quot;stylesheet&quot; href=&quot;&lt;?php bloginfo(&#039;stylesheet_url&#039;); ?&gt;&quot;&gt;\n    &lt;link rel=&quot;stylesheet&quot; href=&quot;&lt;?php bloginfo(&#039;template_url&#039;); ?&gt; css\/slideshow.css&quot;&gt;\n\n\t&lt;link rel=&quot;pingback&quot; href=&quot;&lt;?php bloginfo(&#039;pingback_url&#039;); ?&gt;&quot;&gt;\n\n\t&lt;?php if ( is_singular() ) wp_enqueue_script(&#039;comment-reply&#039;); ?&gt;\n\n\t&lt;?php wp_head(); ?&gt;\n\n\t&lt;script type=&quot;text\/javascript&quot;&gt;\n\t$(document).ready(function() {\t\t\n\n\t\/\/Execute the slideShow\n\tslideShow();\n\n\t});\n\n\tfunction slideShow() {\n\n\t\/\/Set the opacity of all images to 0\n\t$(&#039;#gallery a&#039;).css({opacity: 0.0});\n\n\t\/\/Get the first image and display it (set it to full opacity)\n\t$(&#039;#gallery a:first&#039;).css({opacity: 1.0});\n\n\t\/\/Set the caption background to semi-transparent\n\t$(&#039;#gallery .caption&#039;).css({opacity: 0.7});\n\n\t\/\/Resize the width of the caption according to the image width\n\t$(&#039;#gallery .caption&#039;).css({width: $(&#039;#gallery a&#039;).find(&#039;img&#039;).css(&#039;width&#039;)});\n\n\t\/\/Get the caption of the first image from REL attribute and display it\n\t$(&#039;#gallery .content&#039;).html($(&#039;#gallery a:first&#039;).find(&#039;img&#039;).attr(&#039;rel&#039;))\n\t.animate({opacity: 0.7}, 400);\n\n\t\/\/Call the gallery function to run the slideshow, 6000 = change to next image after 6 seconds\n\tsetInterval(&#039;gallery()&#039;,6000);\n\n\t}\n\n\tfunction gallery() {\n\n\t\/\/if no IMGs have the show class, grab the first image\n\tvar current = ($(&#039;#gallery a.show&#039;)?  $(&#039;#gallery a.show&#039;) : $(&#039;#gallery a:first&#039;));\n\n\t\/\/Get next image, if it reached the end of the slideshow, rotate it back to the first image\n\tvar next = ((current.next().length) ? ((current.next().hasClass(&#039;caption&#039;))? $(&#039;#gallery a:first&#039;) :current.next()) : $(&#039;#gallery a:first&#039;));\t\n\n\t\/\/Get next image caption\n\tvar caption = next.find(&#039;img&#039;).attr(&#039;rel&#039;);\t\n\n\t\/\/Set the fade in effect for the next image, show class has higher z-index\n\tnext.css({opacity: 0.0})\n\t.addClass(&#039;show&#039;)\n\t.animate({opacity: 1.0}, 1000);\n\n\t\/\/Hide the current image\n\tcurrent.animate({opacity: 0.0}, 1000)\n\t.removeClass(&#039;show&#039;);\n\n\t\/\/Set the opacity to 0 and height to 1px\n\t$(&#039;#gallery .caption&#039;).animate({opacity: 0.0}, { queue:false, duration:0 }).animate({height: &#039;1px&#039;}, { queue:true, duration:300 });\t\n\n\t\/\/Animate the caption, opacity to 0.7 and heigth to 100px, a slide up effect\n\t$(&#039;#gallery .caption&#039;).animate({opacity: 0.7},100 ).animate({height: &#039;100px&#039;},500 );\n\n\t\/\/Display the content\n\t$(&#039;#gallery .content&#039;).html(caption);\n\n\t}\n\n\t&lt;\/script&gt;\n\n&lt;\/head&gt;\n\n&lt;body &lt;?php body_class(); ?&gt;&gt;\n\n\t&lt;div id=&quot;page-wrap&quot;&gt;\n\n &lt;header&gt;\n\n            &lt;div id=&quot;header&quot;&gt;\n\n            \t&lt;img src=&quot;&lt;?php bloginfo(&#039;template_url&#039;); ?&gt;\/Images\/Logo-dessin.png&quot; width=&quot;160&quot; height=&quot;160&quot; alt=&quot;Logo&quot; \/&gt;\n\n            &lt;\/div&gt;\n\n\t         &lt;Nav&gt; \n\n\t\t\t\t&lt;?php if (function_exists(&#039;pixopoint_menu&#039;)) {pixopoint_menu();} ?&gt;\n\n   \t\t\t&lt;\/nav&gt; &lt;!-- fin de la nav --&gt;\n\n    &lt;div id=&quot;gallery&quot;&gt;\n\n    &lt;a href=&quot;#&quot; class=&quot;show&quot;&gt;\n    &lt;img src=&quot;&lt;?php bloginfo(&#039;template_url&#039;); ?&gt;\/Album photos\/Cuisine\/DSCF6569.JPG&quot; alt=&quot;&quot; \/&gt;\n    &lt;\/a&gt;\n\n    &lt;a href=&quot;#&quot;&gt;\n    &lt;img src=&quot;&lt;?php bloginfo(&#039;template_url&#039;); ?&gt;\/Album photos\/Cuisine\/DSCF6571.JPG&quot; alt=&quot;&quot;\/&gt;\n    &lt;\/a&gt;\n\n    &lt;div class=&quot;caption&quot;&gt;&lt;div class=&quot;content&quot;&gt;&lt;\/div&gt;&lt;\/div&gt;\n    &lt;\/div&gt;\n    &lt;div class=&quot;clear&quot;&gt;&lt;\/div\n\n&lt;\/header&gt; &lt;!-- fin du header --&gt;<\/code><\/pre>\n<p>Thanks for your help!!<\/p>\n","protected":false},"template":"","class_list":["post-1890828","topic","type-topic","status-closed","hentry"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/1890828","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic"}],"about":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":0,"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/1890828\/revisions"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/media?parent=1890828"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}