Revision 451590d3
Von Cem Aydin vor 7 Monaten hinzugefügt
- ID 451590d3e2318bebb1d67191d8934deed731c6cf
- Vorgänger cd424304
templates/design40_webpages/common/toggle-buttons-for-wrapper.html | ||
---|---|---|
7 | 7 |
<script type="text/javascript"> |
8 | 8 |
var toggles_id = "#toggles" ; // container of the toggle buttons |
9 | 9 |
var wrapper = new Object() ; |
10 |
$(document).ready(function(){
|
|
10 |
$( window ).on( "load", function() {
|
|
11 | 11 |
if( $(toggles_id).parent().attr('class') == "wrapper" ) { |
12 | 12 |
wrapper = $(toggles_id).parent() ; // closest surrounding wrapper to toggle |
13 | 13 |
$(wrapper).addClass("toggled"); |
templates/design40_webpages/generic/toggle_wrapper.html | ||
---|---|---|
12 | 12 |
<script type="text/javascript"> |
13 | 13 |
var toggles_id = "#toggles" ; // surrounding container of the toggle buttons |
14 | 14 |
var wrapper = new Object() ; |
15 |
$(document).ready(function(){
|
|
15 |
$( window ).on( "load", function() {
|
|
16 | 16 |
if( $(toggles_id).parent().attr('class') == "wrapper" ) { |
17 | 17 |
wrapper = $(toggles_id).parent() ; // closest surrounding wrapper to toggle, must have the class .wrapper |
18 | 18 |
$(wrapper).addClass("toggled") ; // change the wrapper into a inline-block instead of a 100%-width-block |
Auch abrufbar als: Unified diff
design40: Toggle Wrapper in Belegen, Höhe korrigiert
window.onload anstatt document.ready verwenden. Dieses wartet bis das
layout vollständig geladen ist und somit wird die richtige Höhe für den
wrapper verwendet.
Behebt: #688