Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #553193

    Dear support,
    I searched for a suggestion to my problem, but nothing seems to be helpful :(
    The #ID and the deeplinks are not working.

    I need an navigation for the LayerSlider:
    LayerSlider with Menu
    Is there any solution to open the slides with a link on the page?

    Thanks and best regards,
    Mic

    #553558

    Hey nextimaging,

    I replied to your other thread already, there’s no point to opening two threads for the same problems.

    Best regards,
    Rikard

    #553581

    Hi Rikard,
    Hey Enflod Team,

    in the LayerSlider API documentation
    http://guide.dream-theme.com/Layer%20Slider%20Documentation/documentation/documentation.html#layerslider-api
    i found some sample code to control the slider but it`s not workig for me :(

    Did someone try to use the layerslider-api with wordpress and enflod?

    “Switch slides with custom controls:”
    <a href="javascript:void(0);" onclick="$('#slider').layerSlider(2);">Change to slide 2</a>

    Can you help me please to add an custom navigation to the layerslider?

    custom navigation area code:
    source: http://pastebin.com/YHBFk1CR

    <!-- Custom navigation bar -->
    <ul id="layerslider_nav">
            <li>Layer #1</li>
            <li>Layer #2</li>
            <li>Layer #3</li>
            <li>Layer #4</li>
            <li>Layer #5</li>
    </ul>
     
     
     
    <!-- Navigation bar style settings -->
    <style type="text/css">
     
            #layerslider_nav li {
                    display: inline-block;
            }
     
            #layerslider_nav li.active {
                    color: red;
            }
    </style>
     
     
     
    <!-- Event handler for slide change -->
    <script type="text/javascript">
            jQuery(document).ready(function() {
                    jQuery('#layerslider_nav li').click(function(e) {
     
                            // Prevent browser's default submission
                            e.preventDefault();
     
                            // Get selected layer index
                            var index = jQuery(this).index() + 1;
     
                            // Change slide by calling LayerSlider API function
                            jQuery('#layerslider_1').layerSlider(index);
                    });
            });
    </script>
     
     
     
    <!-- cbAnimStop callback function to set active class and highlight -->
    function(data) {
     
            // Remove highlight from every menu item
            jQuery('#layerslider_nav li').removeClass('active');
     
            // Get the index of the active layer
            var index = data['curLayerIndex'] - 1;
     
            // Set active class and highlight
            jQuery('#layerslider_nav li').eq(index).addClass('active');
    }
     
    // BE AWARE !!!
    // to change the #layerslider_1 selector to your ID or class name
    #554852

    Hi!

    Please remove the modifications then add this in the functions.php file:

    // slider nav
    add_action('wp_footer', 'ava_custom_nav_script');
    function ava_custom_nav_script(){
    ?>
    <script type="text/javascript">
    (function($) {
        $('.ls_nav_1').click(function() {
            $('#layerslider_1_1').layerSlider(2);
        });
    
        $('.ls_nav_2').click(function() {
            $('#layerslider_1_1').layerSlider(1);
        });
    })(jQuery);
    </script>
    <?php
    }

    In the advance layout editor, add this code in a code block:

    <a href="#" class="ls_nav_1">Change to slide 2</a></br>
    <a href="#" class="ls_nav_2">Change to slide 1</a>

    First button will link to the second slide and the second button will go back to the first slide.

    Regards,
    Ismael

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.