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

  • Home
  • SEARCH
  • 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 5999197
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T00:31:06+00:00 2026-05-23T00:31:06+00:00

This code was working fine until i went to firefox 4 and now it

  • 0

This code was working fine until i went to firefox 4 and now it requires two clicks on the same image for the resize to work? Any thoughts? Here is the code.

    $(document).ready(function(){

$("#slideShow a").click(function() {
var imgTitle = $(this).children('img').attr('title'); // Find the image title
$("#thecap").html(' ' + imgTitle + ' ');
$("#lgImage").attr('src', $(this).children('img').attr('rel'));
$( ".resizeme1" ).aeImageResize({ height: 372 });
});

});

Here is the plugin code in case someone sees something in it?

(function( $ ) {



  $.fn.aeImageResize = function( params ) {

    var aspectRatio = 0
      // Nasty I know but it's done only once, so not too bad I guess
      // Alternate suggestions welcome :)
      , isIE6 = $.browser.msie && (6 == ~~ $.browser.version)
      ;

    // We cannot do much unless we have one of these
    if ( !params.height && !params.width ) {
      return this;
    }

    // Calculate aspect ratio now, if possible
    if ( params.height && params.width ) {
      aspectRatio = params.width / params.height;
    }

    // Attach handler to load
    // Handler is executed just once per element
    // Load event required for Webkit browsers
    return this.one( "load", function() {

      // Remove all attributes and CSS rules
      this.removeAttribute( "height" );
      this.removeAttribute( "width" );
      this.style.height = this.style.width = "";

      var imgHeight = this.height
        ,   imgWidth = this.width
        ,   imgAspectRatio = imgWidth / imgHeight
        ,   bxHeight = params.height
        ,   bxWidth = params.width
        ,   bxAspectRatio = aspectRatio;

      // Work the magic!
      // If one parameter is missing, we just force calculate it
      if ( !bxAspectRatio ) {
        if ( bxHeight ) {
          bxAspectRatio = imgAspectRatio + 1;
        } else {
          bxAspectRatio = imgAspectRatio - 1;
        }
      }

      // Only resize the images that need resizing
      if ( (bxHeight && imgHeight > bxHeight) || (bxWidth && imgWidth > bxWidth) ) {

        if ( imgAspectRatio > bxAspectRatio ) {
          bxHeight = ~~ ( imgHeight / imgWidth * bxWidth );
        } else {
          bxWidth = ~~ ( imgWidth / imgHeight * bxHeight );
        }

        this.height = bxHeight;
        this.width = bxWidth;
      }
    })
    .each(function() {

      // Trigger load event (for Gecko and MSIE)
      if ( this.complete || isIE6 ) {
        $( this ).trigger( "load" );
      }
    });
  };
})( jQuery );
  • 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-23T00:31:06+00:00Added an answer on May 23, 2026 at 12:31 am

    add event to your function within your click event

    from this (code you posted):

    $(document).ready(function(){
    
    $("#slideShow a").click(function() {
    var imgTitle = $(this).children('img').attr('title'); // Find the image title
    $("#thecap").html(' ' + imgTitle + ' ');
    $("#lgImage").attr('src', $(this).children('img').attr('rel'));
    $( ".resizeme1" ).aeImageResize({ height: 372 });
    });
    
    });
    

    to this

    $(document).ready(function(){
    
    $("#slideShow a").click(function(event) {
    var imgTitle = $(this).children('img').attr('title'); // Find the image title
    $("#thecap").html(' ' + imgTitle + ' ');
    $("#lgImage").attr('src', $(this).children('img').attr('rel'));
    $( ".resizeme1" ).aeImageResize({ height: 372 });
    });
    
    });
    

    noticed the word event in your second function()

    did it work?

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

Sidebar

Related Questions

ASP.NET application performing oAuth with Facebook. This code was working fine until a few
This is really strange but this code is working fine unless the value entered
I'm currently doing something like this in some code I'm working on right now:
I have the below code that was working fine until I tried adding the
My code was working fine until I reloaded the program a few hours later.
Anyone got any Idea why this code is not working, It was working fine
Anyone got any Idea why this code is not working, It was working fine
It was working fine up until very recently. Chrome tells me this is incorrect
I'm trying to get this piece of code working a little better. I suspect
I'm working this source code: #include <string> #include <vector> #include <iostream> #include <istream> #include

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.