This is a discussion on "Expandable content box" within the Web Page Design section. This forum, and the thread "Expandable content box are both part of the Design Your Website category.
|
|
|
|
|
![]() |
||
Expandable content box
|
||
| Notices |
![]() |
|
|
LinkBack | Thread Tools |
|
#1
|
|||
|
|||
|
Expandable content box
Dear All,
I am not sure how to explain this or whether it is at all possible with css. I am wanting to create a box that is hidden but when you click on a arrow it opens the box up and shows the content within it, also I would need a cross to then re close the box. If this is possible then your help would be most appreciated. Wayne |
|
|
|
#2
|
||||
|
||||
|
Re: Expandable content box
Have you heard of anything called JQuery? It is a great way for us non technical minded people to use Javescript affects on their site.
http://www.webintenta.com/wp-content...yCollapse.html Here is an example of what i think it is you need, you can download JQuery from the official site below, which contains lots of documentation on how to acomplish what you need http://jquery.com/ Hope this helps Craig
__________________
Last Blog Entry: A Royal Mistake (Feb 20th, 2008)
|
|
#3
|
|||
|
|||
|
Re: Expandable content box
Dear Craig,
Looking at the example provided that is exactly what I am looking for, I will have a read up on the jquery and how it works so that I have an understanding of it. Thanks, Wayne |
|
#4
|
|||
|
|||
|
Re: Expandable content box
To answer the question it is completely possible to do this with straight 100% CSS, but in this case jQuery would probably be more what you want.
Last Blog Entry: Apps every Mac based web dev should consider (Jul 10th, 2008)
|
|
#5
|
|||
|
|||
|
Re: Expandable content box
Thank you for the tip about the jquery Javascript library. I wish to produce an expandable/collapsable box like thet one described above. The jquery sample box is perfect. When I run the sample linked above in this thread, it works perfectly.
However, if I copy the sample code (and change the address of the downloaded jquery library to my own) I will get an alert when I run the page: You must activate ActiveX to view this page. Please tell me what to do not to get this warning. I don't get it when I run the sample code from the page linked above. (I have also tried http://www.flooble.com/scripts/expand.php I get exactly the same problem. Sample page runs fine, but activeX warning when running sample code on my page.) Please tell me how to avoid this. I assume many users are not willing to click the "enable ActiveX" button. Thanks in advance. |
|
#6
|
|||
|
|||
|
Re: Expandable content box
That warning unfortunately is part of internet explorer/windows. try modifying your security settings.
Last Blog Entry: Apps every Mac based web dev should consider (Jul 10th, 2008)
|
|
#7
|
|||
|
|||
|
Re: Expandable content box
Thank you moojoo,
I know very little about activeX. (That is one reason why this warning scares me) But I have been able to surf the internet with the present settings for months without getting this warning. However using this script the warning appears when reaching the page I have made with sample code but not the sample page by jquery. I fear other people who surf to my page will be reluctant to lower their security settings. Last edited by ycc; Aug 9th, 2008 at 07:11. |
|
#8
|
|||
|
|||
|
Re: Expandable content box
Thanks for your input. The problem seems to be related to security settings. If I upload the page to the server, it will work without security warnings. (Another browser security zone.) However I now find that if I include links in the text that opens in the box; these links will only work if I right-click them "open in new window/tab". If I make a standard left-click on the link it will only close the text-box.
|
|
#9
|
|||
|
|||
|
Re: Expandable content box
Then you did something wrong, probably put the class associated with the show/hide on the links.
Last Blog Entry: Apps every Mac based web dev should consider (Jul 10th, 2008)
|
|
#10
|
|||
|
|||
|
Re: Expandable content box
Thanks for your advice, I will try to see if I can follow it.
However, I am just a beginner with javascript, css and classes so I haven't done much yet. I just downloaded the library and made an exact copy of the sample page from jquery. I then only included a hperlink <a .... ></a> in the text in the box. This hyperlink will only work for rightclick, not leftclick. (Somehow, like you say, the "close box"-command will get higher priority than following the hyperlink.) |
|
#11
|
|||
|
|||
|
Re: Expandable content box
Yeah, sounds like your have the id or class appended to the href itself. jQuery will target a link with a specified ID or class to trigger the events
Last Blog Entry: Apps every Mac based web dev should consider (Jul 10th, 2008)
|
|
#12
|
|||
|
|||
|
Re: Expandable content box
The code looks like this, somehow the hyperlink should get higher priority?
|
|
#13
|
|||
|
|||
|
Re: Expandable content box
link pls. Would help to see it in action.
Last Blog Entry: Apps every Mac based web dev should consider (Jul 10th, 2008)
|
|
#14
|
|||
|
|||
|
Re: Expandable content box
Thanks for checking it out
EDIT: The hyperlink has been removed and replaced by the entire correct page source that was so swiftly corrected by moojoo in the post below. Putting the jquery library in the same directory/folder as the code below will make it work. The code originally comes from a link in a post above in this thread: http://www.webintenta.com/wp-content...yCollapse.html
Last edited by ycc; Aug 9th, 2008 at 07:08. |
|
#15
|
|||
|
|||
|
Re: Expandable content box
here is your problem
Last Blog Entry: Apps every Mac based web dev should consider (Jul 10th, 2008)
|
| The Following User Says Thank You to moojoo For This Useful Post: | ||
|
#16
|
|||
|
|||
|
Re: Expandable content box
Well moojoo, I can only express my deepest admiration, thanks a miilion, works prefectly now
|
|
#17
|
|||
|
|||
|
Re: Expandable content box
Just click the thanks button on my post =P. Glad its sorted. Cheers!
Last Blog Entry: Apps every Mac based web dev should consider (Jul 10th, 2008)
|
![]() |
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Expandable Content Script (Swtich Content) | Matc | JavaScript Forum | 0 | Apr 8th, 2008 10:53 |
| Content Placement + Content Dividing | josephman1988 | Website Planning | 2 | Jan 22nd, 2008 05:02 |
| What content to use? | 1840dsgn | Website Planning | 5 | Sep 22nd, 2007 06:47 |
| Layering content on content in CSS? | wickedmoon | Web Page Design | 1 | Sep 10th, 2007 15:23 |
| Expandable Table Problem | legomaniac | Web Page Design | 3 | Jul 15th, 2005 14:16 |