> For pages with a lot of text (and other content) I would like to have
> the possibility to hide and show parts of the page with 'buttons'. I
> have come a long way, but have some problems. I made a page to show
> them:
>    http://www.decebal.nl/testing.html
>
> I have come a long way and for the most part it works. I use div's
> with class switch to define the blocks I want to show/hide. I then use
> jQuery to make those div's switchable and start with them not
> displayed. Look at the source to see how I have done this. I wanted
> buttons with rounded courners. Because this is not possible (as far as
> I know) without images, I use div's with class button and use
> jquery.corner.js to make round corners.
>
> For the biggest part this works. There is a problem with the
> displaying of the buttons. In Firefox and MIE it goes allright. But in
> Opera and Konqueror (and possible Safari, because this uses the same
> engine as Konqueror) the border is not displayed. That is not nice,
> but not a very big problem. But at the moment I click on a 'button'
> the rounded corners disappear. Is there something I can do about this?
> I am now Using $(this).parent().find('.switchButton,
> .hideButton').corner(); in the click function, but that does not work,
> because that makes a mess of hideButton. Also this work is also done
> in browser where it is not necessary.


I changed your code a bit and posted the same page here:

http://jquery.malsup.com/test/sep20.html

Notice that I added a <span> tag to the switchButton and update the
text of the span instead of the button.  This will prevent the loss of
the button corners and will allow you to call "corner" just one time
instead of on ever click.

Mike

Reply via email to