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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T17:03:56+00:00 2026-05-26T17:03:56+00:00

I’m using a wonderful plugin computedstyle.js that gets the computed style of objects. It

  • 0

I’m using a wonderful plugin computedstyle.js that gets the computed style of objects.
It allows me to manipulate the css of things you shouldn’t normally be able to, like constructed images.

I’m able to take an image source which is found in a link, and change the size of the housing div and of the image itself. Usually you can only do that if you know the size of the image.

  1. I construct the image
  2. I size the image
  3. I then size the iframe around it, based on the size of the changed image.

This works in Chrome and Safari, but of course, not Firefox, which in my opinion is fast becoming the new Internet Explorer.

The question, is there a way I can make firefox wait to notice the change and then do the resizing of the iframe?

TO see it work correctly in Chrome and Safari, go to http://syndex.me. And not correctly, Firefox.

Not a must for the question, but if you are wondering what I’m doing, I’m removing the default gallery preview of Tumblrs Photoset Post and replacing it with a single image.

if($(this).find('.html_photoset').length){
    $(".html_photoset").find("iframe").load(function(){
        var myFrame=$(this);                        
        $(this).contents().find('.photoset_row:not(:first-child)').each(function(){
            $(this).remove();
        })
    var psPre = $(this).contents().find('.photoset_row').find('a').attr("href");
    $(this).contents().find('.photoset_row').children(':not(:first-child)').remove();
        $(this).contents().find('.photoset_row').children(':first-child').children().remove();
        $(this).contents().find('.photoset_row').find('a').append("<img src='"+psPre+"'alt='Cover Page' />");
        $(this).contents().find('img').load(function(){
            var myCSS = $(this).getCSS(); //this is the plugin function
            var myY = myCSS.height.slice(0, - 2);
            var myX = myCSS.width.slice(0, - 2);
            $(this).closest(".photoset_row").css({height: myY});
            $(this).closest(".photoset_row").css({width: myX});
            $(this).css({maxHeight: (heightRef-0)});
            $(this).css({maxWidth: "auto"});
                    //after I've made the fixes to the image, I redo it for the iframe:
            var myCSS2 = $(this).getCSS();
            var myY2 = myCSS2.height.slice(0, - 2);
            var myX2 = myCSS2.width.slice(0, - 2);
            myFrame.height(myY2);
            myFrame.width(myX2);
            console.log(myY2);
        })                      
})
}
  • 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-26T17:03:56+00:00Added an answer on May 26, 2026 at 5:03 pm

    This caveat on the .load() jQuery docs page is interesting:

    Caveats of the load event when used with images

    A common challenge developers attempt to solve using the .load()
    shortcut is to execute a function when an image (or collection of
    images) have completely loaded. There are several known caveats with
    this that should be noted. These are:

    It doesn’t work consistently nor reliably cross-browser

    It doesn’t fire correctly in WebKit if the image src is set to the same src as before

    It doesn’t correctly bubble up the DOM tree

    Can cease to fire for images that already live in the browser’s cache

    So, to try and mitigate some of these, I would suggest trying to append a random query string to the end of the image href to avoid it being cached, and avoid the src being set to the same as before, etc.

    i.e. change the psPre line to:

    var psPre = $(this).contents().find('.photoset_row').find('a').attr("href") + '?' + (Math.random() * 1000000);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

That's pretty much it. I'm using Nokogiri to scrape a web page what has
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I've got a string that has curly quotes in it. I'd like to replace
I'm using v2.0 of ClassTextile.php, with the following call: $testimonial_text = $textile->TextileRestricted($_POST['testimonial']); ... and
I have a French site that I want to parse, but am running into
We're building an app, our first using Rails 3, and we're having to build
We are using XSLT to translate a RIXML file to XML. Our RIXML contains
I need a function that will clean a strings' special characters. I do NOT

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.