Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8667647
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T18:01:02+00:00 2026-06-12T18:01:02+00:00

I have this code: $(document).keyup(function(e) { if (e.keyCode == 27 && $(‘#dropdown-themes2’).is(:visible)) { $(‘#dropdown-themes2’).hide();

  • 0

I have this code:

  $(document).keyup(function(e) { 
     if (e.keyCode == 27 && $('#dropdown-themes2').is(":visible")) {
       $('#dropdown-themes2').hide();
    }
    if (e.keyCode == 27 && $('#style-inner').is(":visible")) {
       $('#style-inner').hide("slide", { direction: "left" }, 100);
       $('#panel-opener').animate({left:"0"}, 100).css({'background-image':'url(img/gear.png)',
               'background-color':'#fff'}).attr('title','Open');
    }
  });

So on pressing ESC, one item should slide (close). Its working fine when i am inside parent. But when i click and work inside iframe, ESC isn’t working.
Now that has sense as i need somehow to access parent elements from inside iframe. So I tried with adding parent.document so the code would be:

  $(document).keyup(function(e) { 
     if (e.keyCode == 27 && $('#dropdown-themes2',parent.document).is(":visible")) {
      console.log('radi');
       $('#dropdown-themes2',parent.document).hide();
    }
    if (e.keyCode == 27 && $('#style-inner',parent.document).is(":visible")) {
       $('#style-inner',parent.document).hide("slide", { direction: "left" }, 100);
       $('#panel-opener',parent.document).animate({left:"0"}, 100).css({'background-image':'url(img/gear.png)',
               'background-color':'#fff'}).attr('title','Open');
    }
  });

But nothing. I am having hard time with iframes.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T18:01:04+00:00Added an answer on June 12, 2026 at 6:01 pm

    To answer my own question:

    For example if i want to hide one element in parent document when clicking inside IFrame of id #displayframe, I did this:

     $('#displayframe').load(function(){
         var iframeRef = document.getElementById('displayframe');
         $(iframeRef).contents().click(function(){
                    $(document, parent.window.document).contents().find('#style-inner').hide();
         });});
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Well i have made this jquery code $(document).ready(function(){ $(.graduate).keyup(function(e){ if(e.keyCode!=8 && (e.keyCode<48 && e.keyCode>57)){
I have this code, $('.editLayout #changeLayout').click(function() { $('html').height($(document).height()); $('#fluidWrap').hide('scale'); $.ajax({ data: { mainLayout: true
I have this code to populate two textboxes: $(document).ready(function(){ $('.tb1').keyup(function(){ var content = $('.tb1').val();
I have a JS validation code like this : $(document).ready(function(){ $('#username').keyup(username_check); }); function username_check(){
I have some code here: $(document).ready(function() { $(#querybox).live(keyup, function(e) { var code = (e.keyCode
I have this jQuery code: $(document).ready(function() { $.ajax({ url: pages/+page+.php, cache: false }).done(function( html
I have this code in jQuery.. $(document).ready(function(){ var fieldCounter = 0; ... I have
I have this code running great in ff, opera and chrome: <script type=text/javascript> $(document).ready(function(){
I mean I have this code: <script> $(document).ready( function() { $('html, body').animate({ scrollTop: $(.error).offset().top
Say I have this code in my page: <script language=javascript> $(document).ready(function() { $(.test).click(function() {

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.