si it would be $('#project1').hide();
$('#project2').show()
instead of doing it via css?
On Oct 2, 9:15 am, MorningZ <[email protected]> wrote:
> also
>
> instead of
>
> $('#project1').css('display','none');
> $('#project2').css('display','');
>
> it's better habit to use ".hide()" and ".show()", which gives you more
> options (like animation effects if you want) as well as automatically
> handles different show/hide code needed for different types of DOM
> objects
>
> On Oct 2, 9:00 am, Glen_H <[email protected]> wrote:
>
> > Hey guys, Im new to Javascript and JQuery, I am trying to have a
> > "featured" area on the front page to my site, basically there is a
> > right div area which holds the picture, on the left there is a menu
> > with 4 buttons. here is the html:
>
> > <div id="projectmenu">
>
> > <ul id="projMenu">
>
> > <li><a class="projOne" title="Project1"></a></li>
> > <li><a class="projTwo" title="Project2"></a></li>
> > <li><a class="projThree" title="Project3"></a></li>
> > <li><a class="projFour" title="Project4"></a></li>
> > </ul>
> > </div>
> > <div class="project" id="project1"></div>
> > <div class="project" id="project2"></div>
> > <div class="project" id="project3"></div>
> > <div class="project" id="project4"></div>
>
> > </div>
>
> > Here is the way im setting up the JQuery to try and make the active
> > div change when I choose a button:
>
> > $(function() {
> > $('a projTwo').click(function() {
> >
> > $('#project1').css('display','none');
> > $('#project2').css
> > ('display','');
>
> >
> > });
> > });
>
> > does anyone see where I am going wrong? when I get into the CSS
> > portion will it have to go all the way back like how css is written?
> > meaning in order to identify it, would it have to be #container
> > #project1 or will just #project1 work?
>
> > thank you in advance