[jQuery] Re: Do something when id of clicked anchor is home

2009-08-24 Thread StefanCandan
K, I got it. Changed paragraphs to divs tho. $(document).ready(function(){ $(li).hide() $(p.subtitle).hide() $(p.copy).hide() $(div[name!=home][class=body]).hide() var $i=500; $(li:eq(0)).show($i, function(event){ // use callee so don't

[jQuery] How to make it remove class show, and add class hide.

2009-08-24 Thread StefanCandan
Okay, so I'm working on this site, currently I have this jquery code: $(a.show).click(function(event){ $(a.show[id=+this.id+]).removeClass(show) $(a[id=+this.id+]).addClass(hide) $(div[title!=+this.id+][class=news]).hide(500)

[jQuery] Re: How to make it remove class show, and add class hide.

2009-08-24 Thread StefanCandan
');                         }                 ); }); Not exactly sure if that's what your trying to do. But this should show/hide a div with the same id as the link id on the click event. You will also need a css class of .hide { display:none; } On Aug 24, 2:37 pm, StefanCandan onlyo...@live.nl wrote: Okay, so I'm working

[jQuery] Re: How to make it remove class show, and add class hide.

2009-08-24 Thread StefanCandan
+][class=news]).hide(500);                 $(div[title=+this.id+][class=news]).show(500);                 event.preventDefault();           }); On Aug 24, 11:37 am, StefanCandan onlyo...@live.nl wrote: Okay, so I'm working on this site, currently I have this jquery code

[jQuery] Re: How to make it remove class show, and add class hide.

2009-08-24 Thread StefanCandan
');                 }         );}); /script /head body a class=show href=3 showhide/a div id=3 class=hide div 3 div class=newsnews/div /div /body not sure about the animation On Aug 24, 3:33 pm, StefanCandan onlyo...@live.nl wrote: Thats not what I wanted, I wanted to make the link show a hidden div

[jQuery] Re: Do something when id of clicked anchor is home

2009-08-23 Thread StefanCandan
Okay, so now I fixed it. but having some problems with the hide show. Jquery code: script $(document).ready(function(){ $(li).hide() $(p.subtitle).hide() $(p.copy).hide() $(p[id=about]).hide() var $i=500; $(li:eq(0)).show($i, function(event){

[jQuery] Re: Check if element is shown with show()

2009-08-04 Thread StefanCandan
What I meant was I have a little menu, and a paragraph for each menu item. Once one of the links is clicked, it should do a check if the paragraphs of the other links are hidden, and if one is not, hide it using the hide(slow) animation to hide it. Then if all are hidden, use show(slow) to show

[jQuery] Check if element is shown with show()

2009-08-03 Thread StefanCandan
Hello, I'm building a website with JQuery. Now I need to check if an object is shown, with show() My jqeury to hide all the elements at start: $(p.about).hide(); $(p.gallery).hide(); $(p.links).hide(); $(p.contact).hide(); $(p.home).hide(); Then I show