Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help Using Bootstrap

Status
Not open for further replies.

LyndonOHRC

Programmer
Sep 8, 2005
603
US
I'm just now learning bootstrap. I'm using the helper classes to design a responsive page.

Given this HTML: <span id="CommissionersTableHeadingFlagUp" class="hidden-xs glyphicon glyphicon-triangle-top">Up arrow gliph</span>

Does anyone know what property is changed when the visibility helper classes are used?
I've tried to test it's visibility:

elemVis=document.getElementById('CommissionersTableHeadingFlagUp').style.visibility
also tried: elemVis=document.getElementById('CommissionersTableHeadingFlagUp').style.display;

But both return an empty string. Is there a way to test the current visible state?
url: New Page
The goal is to toggle visibility of table "CommissionersTable" and toggle the up/down arrow gliphs in div "CommissionersTableHeading"
Want appropriate gliph displayed for the media width (media =xs hide table/display down arrow) else (show table/display up arrow) By settng onclick event in div "CommissionersTableHeading"





Lyndon
 
You can only use an element ID value ONCE in a document.

Chris.

Indifference will be the downfall of mankind, but who cares?
Time flies like an arrow, however, fruit flies like a banana.

Never mind this jesus character, stars had to die for me to live.
 
I don't see any element id used twice? Maybe I'm missing it

Lyndon
 
View Source -> Ctrl+F-> then type or paste .. CommissionersTableHeadingFlagUp into the search box.

F3 moves through the four instances.







Chris.

Indifference will be the downfall of mankind, but who cares?
Time flies like an arrow, however, fruit flies like a banana.

Never mind this jesus character, stars had to die for me to live.
 
OK I fixed the duplicates, thanks. style.display and style.visibility are still empty?

Lyndon
 
Javascript will only report back values set by itself. If they are set by CSS, they cannot be obtained by JS and will be empty.

Beyond that, it appears its not changing the visibility property, but the Display Property from inline-block, to none and back.








----------------------------------
Phil AKA Vacunita
----------------------------------
OS-ception: Running Linux on a Virtual Machine in Windows which itself is running in a Virtual Machine on Mac OSx.

Web & Tech
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top