473,386 Members | 1,630 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

how can I create click-down triangles?

I am trying to google for how to create click-down triangles with
either CSS or some other method but not having much luck. It's
probably because my choice of words to describe this is incorrect.
Anyway, what I'm looking for is similar to the click-down triangles in
an OSX Finder window in list mode. Thanks for any help or URL to what
I'm searching for.
Oct 20 '08 #1
5 3349
In article
<d3**********************************@d10g2000pra. googlegroups.com>,
lu*********@gmail.com wrote:
I am trying to google for how to create click-down triangles with
either CSS or some other method but not having much luck. It's
probably because my choice of words to describe this is incorrect.
Anyway, what I'm looking for is similar to the click-down triangles in
an OSX Finder window in list mode. Thanks for any help or URL to what
I'm searching for.
The very simplest thing you can do is make a triangle image in the
closed position and have refer to it in your doc in the usual img
construction way. Make it a link too. When the user clicks it, a new
page with other information comes up but this time with the image of a
down triangle in the same place.

Do you need help in understanding or implementing this?

--
dorayme
Oct 20 '08 #2
On Oct 20, 2:36*pm, dorayme <doraymeRidT...@optusnet.com.auwrote:
In article
<d3ab8975-4c11-4e41-8c53-a841a0be1...@d10g2000pra.googlegroups.com>,

*luxor127...@gmail.com wrote:
I am trying to google for how to create click-down triangles with
either CSS or some other method but not having much luck. *It's
probably because my choice of words to describe this is incorrect.
Anyway, what I'm looking for is similar to the click-down triangles in
an OSX Finder window in list mode. *Thanks for any help or URL to what
I'm searching for.

The very simplest thing you can do is make a triangle image in the
closed position and have refer to it in your doc in the usual img
construction way. Make it a link too. When the user clicks it, a new
page with other information comes up but this time with the image of a
down triangle in the same place.

Do you need help in understanding or implementing this?

--
dorayme
Thanks for your reply. I know this can be done the way that I
described it because I've used a Javascript to do it before but it was
kind of crude and I'm looking for something that will do multiple
triangles. This can be seen on e.g. the google gadget for CNN.com.
However, their source code is impossible to read (and I really mean
impossible). :)

Oct 21 '08 #3
In article
<be**********************************@k36g2000pri. googlegroups.com>,
lu*********@gmail.com wrote:
On Oct 20, 2:36*pm, dorayme <doraymeRidT...@optusnet.com.auwrote:
In article
<d3ab8975-4c11-4e41-8c53-a841a0be1...@d10g2000pra.googlegroups.com>,

*luxor127...@gmail.com wrote:
I am trying to google for how to create click-down triangles with
either CSS or some other method but not having much luck. *It's
probably because my choice of words to describe this is incorrect.
Anyway, what I'm looking for is similar to the click-down triangles in
an OSX Finder window in list mode. *Thanks for any help or URL to what
I'm searching for.
The very simplest thing you can do is make a triangle image in the
closed position and have refer to it in your doc in the usual img
construction way. Make it a link too. When the user clicks it, a new
page with other information comes up but this time with the image of a
down triangle in the same place.

Do you need help in understanding or implementing this?

--
dorayme

Thanks for your reply.

Is it a reply you understand or not? You do not give any clue in your
answer? Perhaps you are suggesting my proposal is a bit crude? That is
certainly true!

Actually, I mused further on this and you can get a more natural looking
dropping down of the triangle on the second page (after clicking the
first page's "closed" triangle) by having an animated gif on the second
page of a triangle turning clockwise till it reaches a down position.

You then make that animated triangle a link that goes to a third page on
which there is a further animated triangle that turns anti-clockwise to
the "closed" position.

I know this can be done the way that I
described it because I've used a Javascript to do it before but it was
kind of crude and I'm looking for something that will do multiple
triangles. This can be seen on e.g. the google gadget for CNN.com.
However, their source code is impossible to read (and I really mean
impossible). :)
--
dorayme
Oct 21 '08 #4
Thanks for your reply. I know this can be done the way that I
described it because I've used a Javascript to do it before but it was
kind of crude and I'm looking for something that will do multiple
triangles.
It's something easy enough to do via JQuery, if you're not averse to JS.

Sample code - untested, but should work fine.

triangle1.gif = right-pointing triangle image
triangle2.gif = down-pointing triangle image
---------
<script src="...pathTo.../jquery.js"></script>
<script>
$(document).ready(function(){
$(".toClick").click(function () {
var wasClicked = $(this);
if($(wasClicked).attr("src") == 'triangle1.gif') {
$(wasClicked).attr("src","triangle2.gif");
} else {
$(wasClicked).attr("src","triangle1.gif");
}
$(this).siblings(".revealMenu").toggle();
});
});
</script>

<div class="container">
<img src="triangle1.gif" class="toClick">
<div class="revealMenu" style="display: none;">
Menu 1 to reveal...
</div>
</div>
<div class="container">
<img src="triangle1.gif" class="toClick">
<div class="revealMenu" style="display: none;">
Menu 2 to reveal...
</div>
</div>
<div class="container">
<img src="triangle1.gif" class="toClick">
<div class="revealMenu" style="display: none;">
Menu 3 to reveal...
</div>
</div>
Oct 22 '08 #5
On Oct 21, 6:26*pm, "S.T." <a...@anon.comwrote:
Thanks for your reply. *I know this can be done the way that I
described it because I've used a Javascript to do it before but it was
kind of crude and I'm looking for something that will do multiple
triangles. *

It's something easy enough to do via JQuery, if you're not averse to JS.

Sample code - untested, but should work fine.

triangle1.gif = right-pointing triangle image
triangle2.gif = down-pointing triangle image
---------
<script src="...pathTo.../jquery.js"></script>
<script>
$(document).ready(function(){
* * * * $(".toClick").click(function () {
* * * * * * var wasClicked = $(this);
* * * * *if($(wasClicked).attr("src") == 'triangle1.gif') {
* * * * * * *$(wasClicked).attr("src","triangle2.gif");
* * * * *} else {
* * * * * * *$(wasClicked).attr("src","triangle1.gif");
* * * * *}
* * * * *$(this).siblings(".revealMenu").toggle();
* * * * });});

</script>

<div class="container">
* * *<img src="triangle1.gif" class="toClick">
* * *<div class="revealMenu" style="display: none;">
* * * * *Menu 1 to reveal...
* * *</div>
</div>
<div class="container">
* * *<img src="triangle1.gif" class="toClick">
* * *<div class="revealMenu" style="display: none;">
* * * * *Menu 2 to reveal...
* * *</div>
</div>
<div class="container">
* * *<img src="triangle1.gif" class="toClick">
* * *<div class="revealMenu" style="display: none;">
* * * * *Menu 3 to reveal...
* * *</div>
</div>
This is *exactly* what I needed. Many thanks!!!
Oct 29 '08 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: me | last post by:
I have a Class Library that contains a Form and several helper classes. A thread gets created that performs processing of data behind the scenes and the Form never gets displayed (it is for debug...
3
by: leon | last post by:
hello friends, i am writing a page aspx and creating controls dinamicaly and then i must to create for each control the events as well. Anybody to know how????? happy day lion
4
by: Daniel Sitima | last post by:
I cannot to create project in Windows Server 2003 with Visual Studio .NET 2003; The error returned was: The default Web access mode for this project is set to file share, but the project...
4
by: I_AM_DON_AND_YOU? | last post by:
There is one more problem I am facing but didn't get the solution. In my Setup Program I am not been able to create 2 things (when the program is intalled on the client machine ) : (1) create...
3
by: Research-13 | last post by:
thank
5
by: Wonder | last post by:
How can I create or use the msgobx to show a message without a default button. The user has explicity to click on the button, so the msgbox closes it. Thanks,
27
by: max | last post by:
Hello, I am a newbye, and I'm trying to write a simple application. I have five tables with three columns; all tables are identical; I need to change some data in the first table and let VB...
3
by: creative1 | last post by:
Here is how you create a complex data report that involves parent and child commands and you can update information at runtime. Its pretty straight forward to work with simple queries; however,...
3
by: sanghavi | last post by:
how to create a set up project in vb.net..how to run an application on a different machine
1
by: TG | last post by:
Hi! I have an application in which I have some checkboxes and depending which ones are checked those columns will show in the datagridview from sql server or no. After that I have 2 buttons:...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.