You sure know far more than me, then, but your core-item should definitely 
have a on-tap={{scrollToTopic}}. I guess it wouldn't work 
with this.$.core_scroll_header_panel.scroller.scrollTop in your case, 
however, as your link targets are not inside that element. Maybe you'd have 
to use this.$.core_scaffold.scroller.scrollTop then? Just guessing though...
Lex

 

Am Mittwoch, 12. November 2014 04:30:28 UTC+1 schrieb Gee Jay Almestas:
>
> im using *core-scaffold* and *core-item* for my menu i also have *my own 
> element wrapped by a div id* i want my core-item menu to scroll to that 
> div when i click it... what will i do to do it? tried to use jquery but its 
> not working... see info below
>
> *here's my header panel*
> <core-scaffold responsiveWidth="600px">
>   <core-header-panel navigation flex mode="scroll">
>     <core-toolbar>Navigation</core-toolbar>
>     <core-menu theme="core-light-theme">
>       <core-item icon="home" label="Home"></core-item>
> <core-item icon="assignment-ind" label="Who am i"></core-item> 
>       <core-item icon="work" label="Works"></core-item>
> *<core-item icon="work" label="Skills"><a class="nav" 
> href="#skill"></a></core-item*> *<!-- WHEN CLICK WILL GO TO SKILL ID DIV 
> -->*  
>         <core-item icon="settings-phone" label="Contacts"></core-item>
>         <core-item icon="link" label="v8"></core-item>
>         <core-item icon="link" label="v7"></core-item>
>         <core-item icon="link" label="v6"></core-item>
>     </core-menu>
>   </core-header-panel>
>
> *my element*
>
>
>
> *<div id="skills"> <!-- should scroll on this part -->    
> <skills-koh></skills-koh> <!-- my element --></div></core-scaffold>im 
> trying to use a js script but its not working*
>
>
> *jQuery(".nav").on("click", function(event){    event.preventDefault();   
>    var dest=null;     if(($($(this.hash)).offset().top) > 
> ($(document).height()-$(window).height())){          dest= 
> $(document).height()-$(window).height();     }else{          
> dest=$($(this.hash)).offset().top;     }    
> $($(this.hash)).trigger("click");    
> $('html,body').animate({scrollTop:dest}, 500, 'swing' );      });*
>
>
> *also added on my index.html<script 
> src="//ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js 
> <http://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js>"></script>*
>
>

Follow Polymer on Google+: plus.google.com/107187849809354688692
--- 
You received this message because you are subscribed to the Google Groups 
"Polymer" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/polymer-dev/907b0106-6691-4014-b465-d5ee71e39250%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to