jQuery
New Wave Javascript


discuss » Paragraph with ID


Posted: Tue Feb 14 12:37:02 EST 2006
From: Daniel Acuff <jojowebdev at gmail.com >

Ahh excellent. Well, since I am very green to 'programming' javascript on my
own I will wait for the Library update or come back to it when I have a lot
more time on my hands.

I would like to try and figure out a way to have the actual text of the lonk
change depending on if the section is open or closed.

Anyone know if this ability is already built in?

Thank you.

On 2/14/06, Andrea Ca'Zorzi <andrea.cazorzi at gmail.com> wrote:
>
> Confirmed. That's one for John, I think.
>
> Maybe change the toggle function like this might fix it:
>
> Old:
> toggle: function() {
> return this.each(function(){
> var d = $.getCSS(this,"display");
> if ( d == "none" || d == '' )
> $(this).show();
> else
> $(this).hide();
> });
> },
>
> New:
> toggle: function() {
> return this.each(function(){
> var d = $.getCSS(this,"display");
>
> if ( d != "none'' )
> $(this).hide();
> else
> $(this).show();
> });
> },
>
>
>
> But I have no time to test it...
>
>
> On 2/14/06, Daniel Acuff <jojowebdev at gmail.com> wrote:
> > Real quick on this.. since I like beating dead horses.. rather I learn
> to
> > code/techniques slowly but then I know it for life.
> >
> > With everything as it is, works nice and such, I noticed one catch, at
> least
> > on my end.
> > When I do a fresh reload of the page
> > (http://www.jojowebdesign.com/skills/javascript/javascript_content.asp)
> > in IE6, and then click the open / close link, it does not refresh the
> > screen, click it again and it acts like it had already 'been' closed but
> > then reopens at this point so visually it is not seen to be closed.
> >
> > Can anyone else reproduce this?
> >
> >
> >
> >
> > On 2/14/06, John Resig <jeresig at gmail.com> wrote:
> > > > The documentation doesn't say to pass two arguments to toggle():
> > > >
> > > > <http://jquery.com/docs/BaseEffects/>
> > > >
> > > > Bug in your code or bug in the documentation? I don't know, but you
> can
> > look
> > > > at the source to find out.
> > >
> > > Don't worry - this function is very new - he was testing it out.
> > > Essentially, you pass two functions to the method toggle() - the first
> > > time the element is clicked, the first function is fired, the next
> > > time - the second - and it continues this way, back and forth. I'll
> > > write up some proper docs for it.
> > >
> > > --John
> > >
> > > _______________________________________________
> > > jQuery mailing list
> > > discuss at jquery.com
> > > http://jquery.com/discuss/
> > >
> >
> >
> >
> > --
> > Dan Acuff
> > Sr. Web Designer, Sr. Web Developer
> > www.jojowebdesign.com
> > 203.733.6336
> > jojowebdev at gmail.com
> > _______________________________________________
> > jQuery mailing list
> > discuss at jquery.com
> > http://jquery.com/discuss/
> >
> >
> >
>
> _______________________________________________
> jQuery mailing list
> discuss at jquery.com
> http://jquery.com/discuss/
>



--
Dan Acuff
Sr. Web Designer, Sr. Web Developer
www.jojowebdesign.com
203.733.6336
jojowebdev at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://jquery.com/pipermail/discuss_jquery.com/attachments/20060214/6bee24c7/attachment.htm