digital
Luxor Admin
Winter is Coming
Posts: 1,727
|
Post by digital on Sept 22, 2007 15:30:32 GMT
I'm looking for a script that will show and hide CSS divs without messing with the original CSS positioning. So far the only ones I've found contain animations or intentionally alter the position of the divs that are shown. This is for a project that will hopefully be integrated with the database when I get round to completing it. For anyone that is interested there are alpha versions of this up here and here
|
|
SkulkrinBait
Morkin Admin
Haxx0rs == Suxx0rs! v4
Posts: 6,680
|
Post by SkulkrinBait on Sept 23, 2007 12:28:52 GMT
The only way I can think of doing this would be using PHP or similar, but I'm not hot on JS.
|
|
digital
Luxor Admin
Winter is Coming
Posts: 1,727
|
Post by digital on Sept 23, 2007 12:55:07 GMT
Hmm I'm not sure if PHP can do that. The second example is the closest I've got to something I want but when I click on the next option it makes the first one hidden.
I'll play around with it a bit later.
|
|
SkulkrinBait
Morkin Admin
Haxx0rs == Suxx0rs! v4
Posts: 6,680
|
Post by SkulkrinBait on Sept 23, 2007 19:11:19 GMT
PHP could do it depending on when you want the CSS hiding.
You'd just need an if clause around the DIV in question.
|
|
digital
Luxor Admin
Winter is Coming
Posts: 1,727
|
Post by digital on Sept 23, 2007 21:28:42 GMT
I was intending to have it so that you could hide and show the different graphs for say stoners and spears. I get what your saying I'm just trying to do it the other way round (instead of server side generating the HTML with CSS). So far I've got a version with div layers that semi works but for some reason the positioning is all messed up so I'll have to poke around with the CSS for that. And yet again this is just to get it working in Firefox, god only knows what it looks like in IE, I just don't have the heart to look
|
|
Shendemiar
Morkin Admin
Mmmm, free goo!
Posts: 6,751
|
Post by Shendemiar on Sept 23, 2007 21:38:26 GMT
Do a javascript function using regexp searching for div tags and delete or replace them.
|
|
digital
Luxor Admin
Winter is Coming
Posts: 1,727
|
Post by digital on Sept 23, 2007 21:47:53 GMT
Hmm I think your confusing me with someone that knows JS. I know a fair bit about CSS but my knowledge of JS is appalling due to the fact that I can't stand it.
I've only just started learning PHP and those images are the first images I've ever created using PHP, so I'm still trying to get to grips with it but I figure once I sit down to it it will be easy. I've already worked out the coding in my head for how to generate line graphs based on data but it doesn't take into account the fact that there will be multiple users using the database.
I think for the time being I will focus on creating a script that will output the data as a graph rather than working on any fancy graphics.
|
|
Shendemiar
Morkin Admin
Mmmm, free goo!
Posts: 6,751
|
Post by Shendemiar on Sept 23, 2007 21:57:15 GMT
Put id='div1tohide" on the div, and put OnClick="div1tohide.style.visible=false;" where clicking would initiate the hiding.
|
|