{jrCore_list module="jrProfile" order_by="_created desc" limit="5" search1="_profile_id in `$_conf.myModule_profile_ids`" template="very_tall_profile_list.tpl"}
{if isset($_items)}
<ul class="list-inline feature-menu">
{foreach from=$_items item="item"}
<li>
<a href="#{$item.myitem_title|jrCore_url_string}">
<h3>{$item.myitem_title}</h3>
</a>
</li>
{/foreach}
</ul>
{foreach from=$_items item="item"}
<div class="item" id="{$item.myitem_title|jrCore_url_string}" style="height:800px;">
<h1>{$item.myitem_title}</h1>
</div>
{/foreach}
{/if}
<ul class="list-inline feature-menu">
{foreach from=$_items item="item"}
<li>
<a href="#{$item.myitem_title|jrCore_url_string}" id="{$item.myitem_title|jrCore_url_string}_click">
<h3>{$item.myitem_title}</h3>
</a>
</li>
{/foreach}
</ul>
$(".list-inline.feature-menu a").click(function(e){
e.preventDefault();
target = this.getAttribute('href');
$(target).scrollintoview({ duration: "normal"});
});
$("some_selector").scrollintoview({
duration: 2500,
direction: "vertical",
complete: function() {
// highlight the element so user's focus gets where it needs to be
}
});
jrCore_register_module_feature('jrCore','javascript','myModule','jquery.scrollintoview.js');
<button onclick="$('#mymenu').scrollintoview();" />
{if isset($_items)}
<ul class="list-inline feature-menu" id="mymenu">
{foreach from=$_items item="item"}
<li>
<a href="#{$item.myitem_title|jrCore_url_string}">
<h3>{$item.myitem_title}</h3>
</a>
</li>
{/foreach}
</ul>
{foreach from=$_items item="item"}
<div class="item" id="{$item.myitem_title|jrCore_url_string}" style="height:800px;">
<h1>{$item.myitem_title}</h1>
</div>
<button type="button" onclick="$('#mymenu').scrollintoview();">Back to top</button>
{/foreach}
<script type="text/javascript" src="https://raw.github.com/litera/jquery-scrollintoview/master/jquery.scrollintoview.min.js"></script>
<script>
jQuery(document).ready(function() {
$(".list-inline.feature-menu a").click(function(e){
e.preventDefault();
target = this.getAttribute('href');
$(target).scrollintoview({ duration: "normal"});
});
});
</script>
{/if}