| | |
Multiple Div Toggle Show/Hide... IE7 not hiding.
Please support our JavaScript / DHTML / AJAX advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
•
•
Join Date: Aug 2008
Posts: 1
Reputation:
Solved Threads: 0
Hi guys.
I have a page for a choir. There is an image of each member's head which when clicked on a div slides in containing an image and blurb of each individual.
The problem.... the div isn't hidden in IE7 or below.
Here's a link.
The page uses mootools v.1.1. and here's the script:
and relevant CSS
It all works fine in FF, Safari, Chrome, IE8, it's just IE7 and below that's the problem.
I have a page for a choir. There is an image of each member's head which when clicked on a div slides in containing an image and blurb of each individual.
The problem.... the div isn't hidden in IE7 or below.
Here's a link.
The page uses mootools v.1.1. and here's the script:
javascript Syntax (Toggle Plain Text)
window.addEvent('domready', function(){ var stretchers = $$('.display'); var toggles = $$('.button'); var mySliders = {}; var myHiders = {}; var visible = null; var marginreset; stretchers.each(function(el, i){ mySliders[i] = new Fx.Slide(stretchers[i]); myHiders[i] = new Fx.Slide(stretchers[i].getParent(), { onComplete: function(){ marginreset = this.wrapper.firstChild.getStyle('margin'); this.wrapper.firstChild.firstChild.setStyle('margin', marginreset); this.wrapper.firstChild.setStyle('margin', '0'); this.wrapper.firstChild.setStyle('height', '0'); this.wrapper.setStyle('height', 'auto'); mySliders[myHiders['next']].toggle(); visible = myHiders['next']; } }) mySliders[i].hide(); }); toggles.each(function(el, i){ toggles[i].addEvent('click', function(){ if ((visible != null) && (i != visible)) { myHiders['next'] = i; myHiders[visible].toggle(); } else { mySliders[i].toggle(); visible = i; } }); }); });
and relevant CSS
css Syntax (Toggle Plain Text)
.button { color: #222; margin: 0 0.25em; padding: 2px 2px; border-bottom: 1px solid #000; border-right: 1px solid #000; border-top: 1px solid #000; border-left: 1px solid #000; font-size: 11px; font-weight: normal; font-family: 'Andale Mono', sans-serif; display:block; text-align:center; background-color:#000000 } a { outline: none !important; /* @ Firefox, remove ugly dotted border */ } a.button { text-decoration : none; } a.button:hover { border-bottom: 1px solid #fff; border-right: 1px solid #fff; border-top: 1px solid #fff; border-left: 1px solid #fff; } .display { padding-top : 1em; color:#FFFFFF; } .display p { margin: 0; padding: 4px; color:#FFFFFF; } #membtext {position:relative;width:700px; height:405px; background-image:url(../images/BG/memberbg.png); }
It all works fine in FF, Safari, Chrome, IE8, it's just IE7 and below that's the problem.
![]() |
Similar Threads
- Save form values - show/hide divs depending on values (JavaScript / DHTML / AJAX)
- can any body help me in show and hide slider (JavaScript / DHTML / AJAX)
- Help: Show - Hide (JavaScript / DHTML / AJAX)
- show and hide data grid? (Visual Basic 4 / 5 / 6)
- Show or Hide a div with JavaScript (HTML and CSS)
- LocalReport show/hide columns in report (ASP.NET)
- show/hide files in tools/folder options not showing (Windows NT / 2000 / XP)
Other Threads in the JavaScript / DHTML / AJAX Forum
- Previous Thread: How to remove underline and blue color from text in html?
- Next Thread: Mouse drag selection box
| Thread Tools | Search this Thread |
acid2 ajax ajaxcode ajaxexample ajaxhelp ajaxjspservlets animate automatically beta box browser bug captchaformproblem checkbox close codes createrange() css cursor debugger decimal dependent disablefirebug dom download dropdown editor element engine enter error events explorer ext file firefox form forms frameworks getselection google gwt gxt hiddenvalue highlightedword hint html htmlform ie7 ie8 iframe index internet java javascript javascripthelp2020 jawascriptruntimeerror jquery jsf jsp jump listbox maps masterpage math media menu microsoft mp4 object onmouseoutdivproblem onreadystatechange paypal pdf php player position programming progressbar prototype redirect regex runtime safari scale scriptlets search security select size software sql text textarea unicode w3c window windowofwords windowsxp \n





