WordPress Webdesign
Inhaber: Günter Weber
info@guenterweber.com
Ludwig-Schopp-Straße 27
53117 Bonn, NRW, Deutschland
Tel. 0228-9768293
Fax 0228-9768296
Umsatzsteuer-Id. gemäß § 27a
Umsatzsteuergesetz: DE248027935
inhaltlich Verantwortlicher
§6 MDStV: Günter Weber
- Give a unique ID to the Color-Section to toggle f.e.: toggle-color-section
- Give to the button a custom-class f.e: color-section-toggler
- the button link is the unique ID of the toggle section
// color-section toggle
function add_custom_toggler(){
if( is_page(29424) ) {
?>
<script>
(function($){
$(window).load(function () {
$('#toggler1').addClass('notseen');
$('.avia-buttonrow-wrap.color-section-toggler').click(function () {
$('#toggler1').toggleClass('notseen');
$('.avia-buttonrow-wrap.color-section-toggler .avia-button[href="#toggler1"] span.avia_iconbox_title').text(function(i, v){
return v === 'First Link' ? 'Close' : 'First Link'
})
});
});
})(jQuery);
</script>
<?php
}
}
add_action('wp_footer', 'add_custom_toggler');
and for quick css:
.notseen {
display: none
}
that part is only to have different titles on the button:
$('.avia-button-wrap.color-section-toggler span.avia_iconbox_title').text(function(i, v){
return v === 'contact me' ? 'close' : 'contact me'
})