Coming soon - Get a detailed view of why an account is flagged as spam!
view details

This post has been de-listed

It is no longer included in search results and normal feeds (front page, hot posts, subreddit posts, etc). It remains visible only via the author's post history.

1
How to anchor scroll to the bottom of parent document from within iFrame container?
Post Flair (click to view more posts with a particular flair)
Post Body

I have no ability to modify the parent document. I want to do this within the iFrame container by targeting an attribute in the parent. Both have the same origin. I did this in jQuery but if it's easier in Vanilla JS, please let me know.

The attribute I'm trying to target in the parent document is: data-cvent-id="widget-EventCountdownTimer-widget:c3946469-3420-4028-ad3a-a31ef109f1a2"

<script> 
$(".page-header ul a").on("click", function (e) {   
// 1   e.preventDefault();  
 // 2 const href = $(this).attr("href");   
// 3 window.parent.$('html, body').animate({ scrollTop: $(href).offset().top }, 800);});   
</script> 

<div class="container">  
 <header class="page-header">  
   <nav>       
    <a href="#widget-EventCountdownTimer-widget:c3946469-3420-4028-ad3a-    a31ef109f1a2">Test</a>     
</nav>

Author
Account Strength
100%
Account Age
11 years
Verified Email
Yes
Verified Flair
No
Total Karma
5,756
Link Karma
608
Comment Karma
5,077
Profile updated: 3 days ago
Posts updated: 5 months ago

Subreddit

Post Details

We try to extract some basic information from the post title. This is not always successful or accurate, please use your best judgement and compare these values to the post title and body for confirmation.
Posted
2 years ago