1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

one page slider jump

Discussion in 'jQuery' started by lew1s666, May 20, 2014.

  1. #1
    I created one page slider from Roots Wordpress theme.
    That the slider jumps from bottom to top when I reach the point.
    - the issue is that there is a small jump between the header and full-widthbanner-container

    this is my code for the jump in _main.js

    common: {
    init: function() {
    $('#nav').affix({
    offset: {
    top: $('.fullwidthbanner-container').height()
    }
    });
    }
     
    lew1s666, May 20, 2014 IP
  2. somasounds

    somasounds Member

    Messages:
    8
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    31
    #2
    Sounds like a CSS issue with .fullwidthbanner-container

    Check to make sure the margin and padding is set the way you need it for both .fullwidthbanner-container and whatever is containing it (probably #nav needs to be margin-top: 0px; padding-top: 0px; but I can't say for sure without seeing the full code )
     
    somasounds, May 22, 2014 IP
  3. lew1s666

    lew1s666 Member

    Messages:
    101
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    30
    #3
    sorry here is the site http://projects.qbf.ie/sticky-navbar/

    and also issue with shortcodes. when i add shortcode lie [gallery id=1] it shows on front end gallery [gallery id=1] . using this on front-page.php


    <div id="container">
    <a name="top"></a>
    <?php
    $args = array(
    'sort_order' => 'ASC',
    'sort_column' => 'menu_order', //post_title
    'hierarchical' => 1,
    'exclude' => '',
    'child_of' => 0,
    'parent' => -1,
    'exclude_tree' => '',
    'number' => '',
    'offset' => 0,
    'post_type' => 'page',
    'post_status' => 'publish'
    );
    $pages = get_pages($args);
    //start loop
    foreach ($pages as $page_data) {
    $content = apply_filters('slider', $page_data->post_content);
    $title = $page_data->post_title;
    $slug = $page_data->post_name;
    ?>
    <div class='<?php echo "$slug" ?>'><a name='<?php echo "$slug" ?>'></a>

    <?php echo "$content" ?>
    </div>




    <?php
    }
    get_footer();
    ?>
     
    lew1s666, May 23, 2014 IP