karacas / imgLiquid

jQuery plugin to resize images to fit in a container.
http://goo.gl/Wk8bU
MIT License
970 stars 207 forks source link

I can't change image #31

Closed Xoquito closed 10 years ago

Xoquito commented 10 years ago

I try to change image for to make a slide show with jQuery attr() Method (http://www.w3schools.com/jquery/html_attr.asp):

Simple example: sym.$("iGirona").attr('src', 'images/girona2.jpg'); or with array of images: sym.$("iGirona").attr('src', 'images/'+aGirona[actGirona]);

But the image don't change. If I put comment or delete imgLiquid function lines then works correctly. Why can it be?

Thank you very much.

Note: dGirona is a div container with class imgLiquid and iGirona is inside as img.

Xoquito commented 10 years ago

I found this issue #8!! only was necessary to call another time the imgLiquid function.

Complete code: sym.$("iGirona").attr('src', 'images/'+aGirona[actGirona]); sym.$("dGirona").imgLiquid();