I am very new to JQuery and to scripting in general so bear with me, this might be a very easy fix and I dont know it. I believe what Im trying to do is about as simple as jquery gets...
Im building a simple portfolio site for myself and I am trying to use the .hide() and .show() methods to hide and show the various sections and subsections. I have one file panels.js which is working fine on its own to hide and show the main sections. But a second file gallery.js, which is supposed to control the subsections, never gets read. I can see the contents of the file in firebug, but nothing inside gets executed. If I take the contents of gallery.js and try to place them into the panels.js file. the whole thing stops working. So Im assuming its something off with the scripts in gallery.js. Heres the site so far: http://www.andrewcroce.com At this point I am only working on the "ARTWORK" section, so that is the only section that should be working, please don't bother clicking on the other sections. What should be happening is that all the entries that say "Image Title" with some lorem ipsum should all be hidden at first, and only the first sentence at the top should show, but at this point all of it just stacks up and none of it is hidden. heres the contents of gallery.js //hide all the subsections and show the intro $(".current_panel .image_area").removeClass("current_area"); $(".current_panel .image_area").hide(); $(".current_panel .intro").show(); $(".current_panel .intro").addClass("current_area"); $(".back_tab").hide(); //when a tab is clicked that section is displayed $(".tab").click(function(){ var current_section = $(this).attr("name"); $(".tab").removeClass("current_tab"); $(".current_panel .intro").hide(); $(".image_area").hide(); $("#"+current_section+"_tab").addClass("current_tab"); $("#"+current_section+"_area").addClass("current_area"); $("#"+current_section+"_area").show(); $(".back_tab").show(); $(".back_tab").click(function(){ $(".image_area").removeClass("current_area"); $(".image_area").hide(); $(".current_panel .intro").show(); $(this).hide(); return false; }); return false; }); Any pointers would be greatly appreciated. Andrew