Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #306979

    Hi everyone,

    I know you can add a section-id to a section element. Is there a way to add a scrolling anchor tag to a non-section element? Like a special heading or text block?

    #306981

    Hi kboger!

    Please turn on Custom CSS field for ALB elements ( http://kriesi.at/documentation/enfold/turn-on-custom-css-field-for-all-alb-elements/ ) and give your element a custom CSS class ( i.e. my-image ) and then add following code to Functions.php file in Appearance > Editor

    function add_custom_script(){
    ?>
    <script>
    jQuery(window).load(function(){
    if ( jQuery("div").hasClass("my-image") ) {
      jQuery(".my-image").attr('id','my-image-id') };
    });
    </script>
    <?php
    }
    add_action('wp_footer', 'add_custom_script');

    It will give an ID #my-image-id to your “my-image” element

    Best regards,
    Yigit

    #307043

    that worked perfectly!

    thanks Yigit…

Viewing 3 posts - 1 through 3 (of 3 total)
  • The topic ‘Need a scroll anchor tag to non-section element’ is closed to new replies.