Element change its size according to dynamicaly loaded image

Hello

I have a "rectangle" with size 50x50px element, which dynamically loads images.

The images of the size of the images that load varies, for example, 128 x 260 or 72 x 155 etc..

I want the $("rectangle") to have the same size as the dynamic image. How can I do this?

the image is loaded as:

SYM. $("rectangle") .css ({'background-size': 'auto', 'background-repeat': 'no-repeat', 'background-image': ' url ("+ item.image +") "});

but it is not true that the size of the image is not the original, it is proportional to the inside to $("rectangle") and its size is 50 x 50

I want to keep the original size of the image and the $("rectangle") change its dimensions to be same as image.

Discover a method to detect the size of the image here;

JavaScript - how to Preview Image, get the size of the file, the image size and width before you download? -Stack overflow

Tags: Edge Animate

Similar Questions

  • [CS5] Change the size of the possible related images by updating the source?

    In a catalogue, I use 400 cases of 10 small labels. The labels are in a linked Illustrator file. I would like to be able to adjust the size of these labels simply by changing the file source and updated the link.

    I know Indesign is normally set up to preserve the physical size of the images, but I thought I could change this by a combination of options of file management and mounting the frame object Style options. I tried various things but so far without success.

    Is this possible?

    Update: I can change the size of the image allright, but the image does not follow. The mounting frame object Style options work only the first time?

    Is there a solution?

    Preference to preserve Image Dimensions when rebinding, when not checked, should retain the same scale, but it is not all cut a dry with an illustrator file, I think. Much will depend on how you change the dimensions to Illy your cropping choices when you have placed the art. If you chose the media and you do not change the size of the artboard, ID is not going to see a change in size. If you chose the rectangle enclosing or Art, most likely a size change will be detected. Is this clear?

  • Cannot change its size and location of the cache of Lightroom

    Capture.JPG

    Hello!

    Whenever I try to change these settings, then click on 'OK '.  When I return to peference, I see the value I changed is returned to the default setting.

    What should I do to solve this problem. Please help Lightroom 3's running so slow.

    Windows 7 64 bit

    Intel Core i7, 16 GB of Ram, HD 2 TB with 800 GB of available space.

    Thank you in advance.

    Por

    Try to rename/move/delete your preferences file, it can be useful. This will reset all your preferences. If you only rename/move, you can return to it if without success.

    BTW, the Camera Raw preferences (such as the size of the cache and location) are kept in:

    'C:\Users\PoramateV\AppData\Local\Adobe\CameraRaw\Defaults\Preferences.xmp '.

    Gossweiler beat

    Switzerland

  • 3D LAYER DOES NOT CHANGE ITS SIZE

    I don't know what happens when I convert a 3D layer and try to move in the Z axis, the layer is not to turn, it is as always in the same plane. Everything works when I change project, if I create a new project SORPRISE: works, but when I come back to the same project, still does not... There is something I have not activated?
    Thank you!

    You are probably looking to the front view rather than the active camera.

    On a sidenote, if you are going to use 3D layers you'll have much more success if you add a camera to your scene.

  • What could cause a VI to change its behaviour according to whether he was executed alone or as part of a program?

    I tried to list the frequencies of an Agilent 4294 A impedance Analyzer. I managed to collect the data, but there are a number of additional null/zero values at the beginning of the list of frequencies. This only happens if I use the VI within a program. If the VI is run in isolation, it works perfectly. Does anyone have ideas, what could cause this behavior?

    Thanks in advance

    Chris.

    When you run a VI as a top-level, standalone VI you usually have a User Interface that is often managed by a Structure of the event.  When running as a Subvi, the cover cannot be opened (which makes the structure of the event does not respond) or certain features of the UI (for example Stop) may have a different behavior. Also the file which are derived from path of the VI paths may differ.

    As said Albert, please give us more information.  It would be best to post on the screws.

    Lynn

  • change the size of the swf according to the size of html page

    Hi experts
    I want to change my swf size according to the size of the html page in which she opens
    such as if the page size is 1024 x 768 then swf should scale to this size
    If its 700 per 500 also sw should change its size is possible
    I want this for my animation initially FRO m edge on the page

    Basically, I do not know how this has tried various options for last week no chance
    There are 100% option for swf that will scale the size of the swf to 100% of the page, but it does not toedge of page edge

    can anyone help

    Quote:
    Posted by: newsgroup user
    Thanks urami who worked

    Darr_darshan wrote:
    > Hi experts
    > I want to change my swf size according to the size of the html page in which it
    > open
    > such as if the page size is 1024 x 768 then swf should scale to this size
    > If its 700 per 500 also sw should change its size is possible
    > I want this for my animation initially FRO m edge on the page

    First of all, the size of the screen is never the same as the size of the browser to not use if
    you want to keep the proportions when scaling your files and do not distort the
    content. Keep in mind that the browser has its chrome all around, more grand, being on top
    of the screen (navigation), bar State and borders on the left and right sides.
    Second, always resize movie to the top, never down. While the scaling of movie you able to
    Keep your text, not the case when you descale movies especially with small text.
    who become illegible. Then you make movies in (example) 600 x 400 and intensify their
    instead.

    To fill the browser window, go to file - publish setting and on the HTML tab
    change the PIXEL size of PERCENT and set 100% x 100% - publish.
    Open the published html document recently opened in your favorite HTML editor, such as Notepad.
    Dreamweaver and Frontpage, adjust the margins up, down, left and
    right to zero pixel. This will make it fill the window entirely. Flash is
    not give this possibility.

    --
    Best regards

    Urami

    --

    !!!!!!! Merry Christmas!
    &
    Happy new year


    If you want to send me a message - DO NOT LAUGH at MY ADDRESS

  • Change the size of the CVI controls depending on the size of the screen

    Hello

    I'm trying to do something and I don't know if it is possible,

    I have panelMain than my handful of Panel, when I start my program and I show my sign that I'm maximizing the flexible screen up with:

    SetPanelAttribute (panelMain, ATTR_WINDOW_SIZE, VAL_MAXIMIZE) I do so to make this soft generic being for each screen size...

    but when I do so all the buttons go to the left of the screen while leaving me a blank gray surface in the right.

    I want to know is I can do a generic Panel as in desktop software or other software that the buttons change this size according to the size of the screen?

    If you have other solution there will also be grid...

    Thank you

    Well, that is not exactly true: according to the help of this attribute:

    Specifies if the content is put on the scale when the Panel is resized. This applies to programmatically resize, resizing in the User Interface Editor and the resizing by the end user.

    An alternatirve is to set the resolution setting in the editor of the IUR for the Panel to 100%: this should ensure the Panel is resized automatically regardless of screen resolution its original dimensions.

  • Muse changes in size of embedded HTML items

    Hello

    Muse makes me crazy: I added HTML elements on my website and Muse always adjusts em. For example: one is 317 x 356 Pixels - but Muse adjusts to 396 x 423. Now I go and change it to 317 x 356 - and a few seconds later it is again 396 x 423. And if I try resize it with the mouse, it expands and more great everytime I try resize it.

    What can I do? What is the problem with the muse?

    Best,

    Sven

    How do you define the width and height? You change the embed code or by using the width and height in Muse controls? Videos from YouTube and most HTML code embed specify their own dimensions. If you have accidentally changed the dimensions of the container holding the embed code, the easiest to get the widget to default size is drag-and - resize the widget with the mouse for the dimensions that are much smaller than their default size. Muse at the beginning you will resize to these reduced dimensions but will then ask the browser to display the embed code and report of its dimensions. If the dimensions are larger than the current size of the container, Muse will reset the size of the container to match those reported by the browser.

    In regards to your embed code bandcamp, it consists of an iframe with inside dimensions of 356 x 317. For HTML embed code stuck on a page, Muse knows not what is in the code, but he must know the dimensions, so he can put in a container. So, Muse gives the embed code to the browser and allows the browser determine its dimensions and generate an image of the poster for in Muse design-time rendering. These dimensions are the initial dimensions of the container. Muse allows you to style this container by adding a line and filling, for example, and it allows you to resize the container. If you try to resize the container by dragging a resize handle or by using the controls width and height, Muse gives the code html integration a chance to adapt to the new size of the container by distributing the return embed code to the browser with the container, in that it must draw. If the embed code is smart enough to adjust its dimensions, he will do and pass a new image of the poster and new dimensions to Muse. In this case, the iframe has coded hard dimensions so it cannot change its size. However, Muse still will allow you to adjust the dimensions of the container until you resize to be less than what the browser says that its size should be.

    Try the following experiment with your bandcamp widget. Give him a colorful filling. It is larger than 356 x 317 resize by dragging the right bottom selection handle. When you release the mouse, Muse will spend the container and the embed code of the widget on the browser for him give a chance to resize the widget. The band camp code fails if you see a fill colorful in the portions of the container unfilled by the widget. Now resize the container less than 356 x 317. Muse gives the widget the ability to resize once again, but the browser returns again 356 x 317 for its dimensions. Muse allows to adjust the dimensions of the container to match this minimum size.

    If you really want to make the widget a different size, you will need to adjust the dimensions specified in the embed code. If you want to experiment, try the following:

    1. right mouse click on the widget and select 'edit HTML... »

    2. find the values for "width" and "height" and change them to something else. Try changing the width to something like 500px. Be sure to preserve the quotes and semi-colons and change only the numbers so that you do not break the rules syntax.

    3. press OK and look at how it changes the widget.

  • HP15: change the size of

    When I have the address bar upward and I'm looking for something on the internet or I play a game all of a sudden my phone change its size and I saw a lot of things.  Anyone know how to stop my page to shrink or expand while I do work on this?  Like, is there a lock in my computer somewhere that I can click on stop my page become larger or smaller?

    Thanks for your help.

    Hello @ginnykins

    What browser are you using when this happens?

    Usually, the random clicks or the keys in a browser are the result of a sensitive Touchpad.

    If you go to settings > devices > mouse and touchpad > Additional options of the mouse and choose the Clickpad settings tab, click the button settings ClickPad.

    Under the MultiFinger gestures, uncheck the Pinch Zoom. You maight need to disable two fingers scrolling too.

    Click OK, and then click OK again.

    If this doesn't help, go back and look under, uncheck tapping finger two, three and four.

    In the dialog of settings for mouse and pad touch, you can change the list of drop-down Touchpad to Long delay sensitivity.

    It be a sensitivity slider, but Microsoft did disappear in Windows 10 now.

    Let me know if it helps.

  • Resize the image sources - change the size of the images database

    Hi all

    I have a trivial problem, but I can't deal with it. I have a project with compositions called slides. Each slide have JPG image as layer and this image is assigned 100% to 106% Resize effect (two keyframes). The images have their own folder. I need to replace all the images but the problem is that the new images have different sizes, for the most part, they are bigger than originals. When I right-click the imported images directly on I don't see any options to change their size (single space reserved or solid). When I double click them to open it in a new tab I don't see no resizing tool and layer menu is grayed out for the most part.

    So far, I found that I have three possibilities:

    1. resize as a layer in the composition of each slider. Unfortuately I don't see any way to change the database size, so resize here means add another keyframe or change existing. If I change the first keyframe on the layer in the composition of the slide then I have to proportionally resize the last of them. There are about 20 slides this process would be quite painful

    2. resize the images before importing - with PSP, GIMP or same IrfanView. It would be a much better solution than before however, this means a blind resizing - without no preview as the composition. Whenever I want to change the size a bit, I have to import image again. Painful.

    3 convert the images to the compositions,

    Convert each JPG file in composition, put this composition as the layer to each composition drag next to layer JPG, transformation of copy of layer of JPG to the composition of the image layer and delete the JPG layer. Long process but the effect is exaclty as I want and the project is fairly durable for any other modification of the image. However, in larger projects where there are many effects assigned to layers, it would be very painful.

    So is there an easy way to change the sizes of the imported images database? I can't believe that in such a huge program like After Effects, there is no way for such a simple task. I believe firmly im just something missing.

    You can resize your layers in Ae with scale parameter. (transform-> scale). If there is no animation, you need not place a keyframe. for example, you can resize your layer to 46% and decide to evolve for a while, so the first keyframe will be 46%, and the last keyframe is 83%.

    Yes, I know that if you have layer with no keyframes for the scale property then scaling ways to change the size of its base. However, in my example, I have two frames - 100% and 106%. If I import large image so I have to resize. If im on the first keyframe, and then it wil change its size to 100% for example, 56%. But the last keyframe is not changed - its still 106%. So that means animation past from 56% to 106% - image develops much more quickly than in an original animation.

    But now I found that I can select all the points of the keyframe by clicking on the entire property scale and resize proportionally when I resize the image, all the points of the keyframe. It's the simplest and most effective solution for me!

    Thanks for the help!

  • How to change the sizes of elements of array programmatically?

    Hi all

    I have a small question about changing the size of the elements in the array. I hope someone can help, because I am in a bind!

    I connect certain intensities of a range of fibers using a camera. For the calibration of the system, I gain a picture of the camera, click on the image points to divide it into areas of interest. I have my image to overlay with a grid indicating the areas of interests - for example a 4 x 6 picture. I then have to select fibers - or Kings - I want to connect from.

    I have a cluster type-def (a number and a Boolean value) to specify the number of fibers and to enable logging of this fibre power. I superimpose a (transparent) picture of this typedef on my image to correspond with the regions of interest. So here's my problem - I want to change the dimensions of the table for each control corresponds to my KING. I can resize the elements of law on the elements on the façade, but couldn't find a way to do it programmatically. The array property node > element of array > limits don't "change to write" it's the first thing I tried.

    Its only really important elements alignment with my Kings - so adding in the gaps/spacing programmatically would also work for me... goal again once I can't understand how to do this! I've attached a screenshot of part of my image with table superimposed to show you all exactly what is my problem.

    Thanks in advance for you help,

    Dave

    PS I'm under Labview 8.6 without adding vision on.

    Here is my cheat (and cheap) way if you want to get fancy and Center digital indicators and booleans, you could add shims on the North and west sides, too.

  • Animate the edge - how to change the size of the stage without changing the element of the scene & the size of the element?

    Hello

    I've created a demo using lively edge, the size of the demo is 1280 x 720. After that I want to change my size to 1280 x 600. But when I change dimension, the element in the file also change its dimension.

    For example - original size is 1280 x 720 & my element is rounded circle.

    When I hid it at 1280 x 600, the rounded cicle convert oval.

    but I want the same element of dimension to the stadium.

    Help, please...

    Concerning

    E. Kumar Muduli

    I'm having a hard time following your scenario...

    How you resize your internship?

    On the edge resize your stage normally does not affect the size of items on your stage.

  • After the upgrade to v9.0 my address window and search window change size according to the length of the address. How to keep the search engine the same size?

    Search bar and address bar change size according to the length of the URL. How to keep my search bar the same size?

    Start Firefox in Firefox to solve the issues in Safe Mode to check if one of the extensions or if hardware acceleration is the cause of the problem (switch to the DEFAULT theme: Firefox (Tools) > Add-ons > appearance/themes).

  • Change the size of the text in a label for a text element single view.

    I was wondering how I would change the size of the text in a single field of view. I think I need to change the scope attributes of HTML table cells, but I'm not sure what to put. I am able to edit the text inside the element by changing the attributes of the element field Form HTML with the following text style = "verdana fonts: 24pt;

    Thank you

    Jay

    Jay Hartford wrote:

    I was wondering how I would change the size of the text in a single field of view. I think I need to change the scope attributes of HTML table cells, but I'm not sure what to put.

    What version of APEX, theme and layout grid type do you use? 4.2 with a theme that does not use based on tables of HTML layout (such as the topic (25), labels is not a property of the attributes of HTML table cells .

    You must specify your APEX version in all issues and UI/theme/templates for a page layout or the question of Visual formatting.

    I am able to edit the text inside the element by changing the attributes of the element field Form HTML with the following text style = "verdana fonts: 24pt;

    Create the following style sheet on the page property CSS Inline (4.2) or the property header HTML (previous versions), replace "P1_X" with the name of your article:

    label[for="P1_X"],
    #P1_X {
      font-family: verdana, sans-serif !important;
      font-size: 2em !important;
    }
    

    If we knew what theme you were using it would be possible to eliminate the! important statements by using a more specific selector for the label.

  • Elements will allow me to isolate an object, change its color and remove the rest?

    13 elements will allow me to isolate an object in a picture, change its color and remove everything else?

    Yes. Suggest you download the day 30, free, trial of the program and see if you like it. The trial version is the full version.

Maybe you are looking for