Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > Do I need javascript ?

Reply
Thread Tools

Do I need javascript ?

 
 
Chris Leonard
Guest
Posts: n/a
 
      02-22-2004
Hi.

I'm building up a page which uses multiple divs to display information from
a menu. As each menu item is 'clicked' I want the corresponding div to
display.

I've done something similar with JavaScript a long time ago but being new to
CSS I wondered if it was possible without using JavaScript. I'm pretty sure
I nedd to use some js as I understand CSS only provides the format, it
doesn't "do" anything itself

Anyone offer me some smart advice please on a way forward.

Thanks in advance

Chris


 
Reply With Quote
 
 
 
 
Els
Guest
Posts: n/a
 
      02-23-2004
Chris Leonard wrote:

> Hi.
>
> I'm building up a page which uses multiple divs to display information from
> a menu. As each menu item is 'clicked' I want the corresponding div to
> display.
>
> I've done something similar with JavaScript a long time ago but being new to
> CSS I wondered if it was possible without using JavaScript. I'm pretty sure
> I nedd to use some js as I understand CSS only provides the format, it
> doesn't "do" anything itself
>
> Anyone offer me some smart advice please on a way forward.


Not really smart advice, but why don't you make pages?
Clickin on a link brings out the next page, which displays
the corresponding div. As you make the pages otherwise
identical, it 'looks just like javascript'

If the div which is to be displayed is merely a 'tooltip' to
the menu, you can include it in the link with a <span>, and
have it display:none when not clicked, and display:block
when clicked, using a:hover span{}.


--
Els

Sonhos vem. Sonhos vo. O resto imperfeito.
- Renato Russo -

 
Reply With Quote
 
 
 
 
Els
Guest
Posts: n/a
 
      02-23-2004


Els wrote:

> If the div which is to be displayed is merely a 'tooltip' to the menu,
> you can include it in the link with a <span>, and have it display:none
> when not clicked, and display:block when clicked, using a:hover span{}.


Oops, not true. It will display when hovered, not when clicked.
Not sure if it can be made to stay after clicking it, with
a:active maybe? And you probably want it to 'go away' when
the next link is clicked, as well...

--
Els

Sonhos vem. Sonhos vo. O resto imperfeito.
- Renato Russo -

 
Reply With Quote
 
Beauregard T. Shagnasty
Guest
Posts: n/a
 
      02-23-2004
Quoth the raven named Els:

> If the div which is to be displayed is merely a 'tooltip' to the
> menu, you can include it in the link with a <span>, and have it
> display:none when not clicked, and display:block when clicked,
> using a:hover span{}.


Wouldn't it be easier to get the tooltip effect by using the title
attribute, instead a a span? Assuming that will help the OP, of
course, and I'm not quite certain what he is asking.

<div title="Bunch of text that pops up when div is hovered">Whatever
is in the div here...</div>

--
-bts
-This space intentionally left blank.
 
Reply With Quote
 
Andy Dingley
Guest
Posts: n/a
 
      02-23-2004
On Sun, 22 Feb 2004 23:50:18 +0000 (UTC), "Chris Leonard"
<(E-Mail Removed)> wrote:

>I wondered if it was possible without using JavaScript.


Yes. try Eric Meyer's site for examples.

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
JavaScript or not JavaScript Mark Rae ASP .Net 36 09-09-2006 01:12 PM
href="javascript:func()" vs href="#" onclick="javascript:func()" CRON HTML 24 06-20-2006 08:05 PM
Javascript -> Applet: variable reset after method call from javascript?! mcdeveloper Java 1 06-13-2006 08:34 AM
Need a javascript guru (I need help!) Jarrod Hyder Javascript 1 01-27-2005 10:05 PM
Need your help, I am new with javascript, what do I wrong? javascript form validation suddenly doesnt work francisco lopez Javascript 2 12-30-2004 12:18 PM



Advertisments