Is the suggested way to have links to anchor tags still using javascript or 
have there been some developments with polymer/shadow dom that address 
this? Could find anything googling, currently doing:

<core-item id="core_item" label="Topic" horizontal center layout>
<a href="javascript:document.querySelector('html /deep/ 
#p1').scrollIntoView()"></a></core-item>,

as mentioned above

On Monday, September 15, 2014 at 1:21:29 AM UTC-7, Atomiko Lex wrote:
>
> This works just perfectly, fantastic! Thank you for all your terrific help!
>
> Now I just have to understand how you constructed scrollToTop. I just got 
> a copy of Cody Lindley's DOM Enlightenment, hope that and the API developer 
> guide will get me going. 
>
> Am Sonntag, 14. September 2014 21:45:05 UTC+2 schrieb Frankie Fu:
>>
>> <core-item id="core_item2" label="Topic2" horizontal center layout>
>>>                   <a href="javascript:document.querySelector('html 
>>> /deep/ #end_p1').scrollIntoView()"><paper-ripple 
>>> fit></paper-ripple></a></core-item>
>>>
>>> <a href="javascript:document.querySelector('html /deep/ 
>>> #core_scroll_header_panel').scroller.scrollTop = 0;" id="end_p1">go to 
>>> top</a> ,     
>>>
>>>
>>
>> I would suggest not to put javascript on href, instead I think for your 
>> use case you can simply do something like this:
>>
>> <paper-item label="Topic 1" on-tap="{{scrollToTop}}"></paper-item>
>>
>> scrollToTop: function() {
>>   this.$.core_scroll_header_panel.scroller.scrollTop = 0;
>> },
>>
>> Here is a jsbin I modified from your sample code in another thread.
>> http://jsbin.com/xuwogawapomi/1/edit
>>
>

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/5e2863e4-4bd1-46ee-acce-9bf192cf4704%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to