Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- function add_bodyclass_to_tabs(){
- ?>
- <script>
- (function($) {
- function my_tab_switch() {
- setTimeout( function() {
- if ($(window).width() <= 989) {
- $("#top").addClass("tab_switch");
- }
- else {
- $("#top").removeClass("tab_switch");
- }
- }, 150)
- }
- $(window).on('load resize', function() {
- my_tab_switch();
- });
- })(jQuery);
- </script>
- <?php
- }
- add_action('wp_footer', 'add_bodyclass_to_tabs');
- //Styling für diese Tabs
- function add_styling_for_tabs(){
- ?>
- <script>
- (function($) {
- $('.responsive #top .tabcontainer.mobile-tabs-closed .av_tab_section .tab').on('click',function() {
- $(this).toggleClass('highlite-tab');
- $(this).closest('.av_tab_section').siblings().find('.tab').removeClass('highlite-tab');
- $(this).next('.tab_content').toggleClass('mobile-tab');
- $(this).closest('.av_tab_section').siblings().find('.tab_content').removeClass('mobile-tab');
- });
- })(jQuery);
- </script>
- <?php
- }
- add_action('wp_footer', 'add_styling_for_tabs');
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement