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 7687297
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T19:40:21+00:00 2026-05-31T19:40:21+00:00

Let’s say I’m doing a code. This code uses kontextua ads <div class=pread> <div

  • 0

Let’s say I’m doing a code. This code uses kontextua ads

<div class="pread">
    <div class="postad kontextuaDisplayREGULARS728x90">
    <div style="display: block !important; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; overflow-x: hidden !important; overflow-y: hidden !important; padding-bottom: 2px !important; padding-left: 4px !important; padding-right: 4px !important; padding-top: 2px !important; z-index: 10000 !important; ">
        <iframe style="display: block; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; overflow-x: hidden; overflow-y: hidden; background-position: initial initial; background-repeat: initial initial; " frameborder="0" width="728px" height="90px" src="javascript:(function(){return '<html><meta http-equiv=\'Content-Type\' content=\'text/html\' charset=\'UTF-8\'></meta><head><style> html { overflow:hidden; } body { background-color:transparent; float:left; padding:0; margin:0; overflow:hidden; height:90px;width:728px;} .contenido{margin:0}</style></head><body><div class=\'contenido\' id=\'banner\'><SCRIPT TYPE=\'text/javascript\' SRC=\'http://ad.yieldmanager.com/st?ad_type=ad&ad_size=728x90&section=2871061\'></SCRIPT></div></body></html>'})()"></iframe>
    </div>
    </div>
</div>

I wan’t to know when clicked and apply a CSS to parent “.pread”. How can I do this?

<script>
        $(".postad").live('click', function(){
        alert("clicked");
            $(this).parent().css({
                'backgroundImage' : 'url(http://cdn1.iconfinder.com/data/icons/DarkGlass_Reworked/128x128/actions/camera_test.png)',
                'backgroundColor' : 'limeGreen'
            });
        });
</script>

But it doesn’t work. Thanks!

  • 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-05-31T19:40:23+00:00Added an answer on May 31, 2026 at 7:40 pm

    Your code works if you give some actual content to the postad div other than the iframe. You can see it work here if you click on the xxx that I added to that div.

    It does not work if you click on the iframe and that’s because clicks don’t bubble out of an iframe into parent objects so when you click in the iframe, no click event is received in the postad div. If you click on the iframe, the click stops there.

    It is possible to intercept a click on an iframe from the parent page, but that involves putting a transparent div over the top of the iframe so the parent page gets the click, not the iframe. You can see the transparent div idea work here: http://jsfiddle.net/jfriend00/h2WTB/ – just click on the download image and the click will be handled by the transparent div which will bubble to your postad event handler.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Let's say on a page I have alot of this repeated: <div class=entry> <h4>Magic:</h4>
Let's say i have this block of code, <div id=id1> This is some text
Let's say I have this code: <p dataname=description> Hello this is a description. <a
Let's say you have a class called Customer, which contains the following fields: UserName
Let's say I'm writing a PHP (>= 5.0) class that's meant to be a
Let's say I can call a method like this: core::get() . What is the
Let's say I have a text file composed like this ##### typeofthread1 ##### typeofthread2
Let's say I have one class User, and it has a property of type
Let's say you have a class library project that has any number of supplemental
Let's say I have an abstract parent class called shape, and that there are

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.