Support » Plugin: LuckyWP Table of Contents » Heading Settings in mobile / tablet / desktop

  • Hello,
    thanks for the good working plugin. Unfortunately I got some Problem with it. I just added the TOC on a Blogpage with differnt Headings and settings for mobile, desktop and tablet versions. The problem is, that the Heading from the text wich has different settings for mobile, tablet and desktop is shown 3 Times in the TOC cause it´s 3 Times in die Code. But the Desktop version is only visible for someone who browses via desktop and so on…

    How is it possible to do the same with the Lucky TOC?

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author LuckyWP

    (@theluckywp)

    Hello!

    Try add this code to JS-file in your theme:

    (function($) {
        $(function() {
            $('A.lwptoc_item').each(function() {
                var el = $($(this).attr('href'));
                if (!el.length || el.is(':hidden')) {
                    $(this).parent().hide();
                }
            });
        });
    })(jQuery);
    irob03

    (@irob03)

    Hey LuckyWP,

    thanks for the Code. Sorry for asking where exactly do I have to add it? I am Using the Theme Flatsome (child Theme).

    Thanks!

    Plugin Author LuckyWP

    (@theluckywp)

    I can recommend our plugin LuckyWP Scripts Control.

    You can add scripts from admin panel.

    Add this code:

    <script>
    (function($) {
        $(function() {
            $('A.lwptoc_item').each(function() {
                var el = $($(this).attr('href'));
                if (!el.length || el.is(':hidden')) {
                    $(this).parent().hide();
                }
            });
        });
    })(jQuery);
    </script>
Viewing 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.