Page 1 of 2

Javascript for image sizing stopped working

Posted: Mon Nov 04, 2013 1:44 pm
by prashant purohit

Hi,

Suddenly the java script to adjust image based on screen size stopped working. This has happenned after upgrade. Pls suggest.

Regds


Javascript for image sizing stopped working

Posted: Mon Nov 04, 2013 1:55 pm
by Maryna Brodina

Hello! Could you post code which doesn't work and tell us where you use it?


Javascript for image sizing stopped working

Posted: Mon Nov 04, 2013 1:58 pm
by prashant purohit

Hi,

I use the below code to adjust the iamge size too 100% of container size. I am using this on splash screen of my application:

Appery('mobileimage_47').width('100%').height('100%');


Javascript for image sizing stopped working

Posted: Mon Nov 04, 2013 3:35 pm
by prashant purohit

Hi,

Any update on the issue please


Javascript for image sizing stopped working

Posted: Mon Nov 04, 2013 3:42 pm
by Maryna Brodina

Not yet, sorry. Working on it.


Javascript for image sizing stopped working

Posted: Mon Nov 04, 2013 4:18 pm
by Kateryna Grynko

Hi Prashant,

The Dimension set for the Image component has a higher priority. Try the following: preAppery('mobileimage_6').attr("style", "width: 100% !important; height: 100% !important;");/pre


Javascript for image sizing stopped working

Posted: Sat Nov 09, 2013 9:46 am
by prashant purohit

Thanks...It worked


Javascript for image sizing stopped working

Posted: Sat Nov 09, 2013 9:57 am
by Ram

I have the same problem since last update, the "important" key word didn't work for me, this is my code:

code
Appery('img_wait').show();

Code: Select all

 Appery('img_wait').css('position','absolute'); 

 Appery('img_wait').css('width','100% !important'); 
 Appery('img_wait').css('height','100% !important'); 

 Appery('img_wait').css('margin', 'auto'); 
 Appery('img_wait').css('align', 'center');  
 Appery('img_wait').css('top', '-20px');  
 Appery('img_wait').css('left', '-2px');  

 Appery('img_wait').css('z-index','99999');   
 Appery('img_wait').refresh(); 

 $(".ui-page").triggerHandler('updatelayout'); 

/code

pls advice,

Thx much in advance!!
Best,
R.


Javascript for image sizing stopped working

Posted: Sat Nov 09, 2013 10:14 am
by Alena Prykhodko

Hi Ram, we'll check what may cause it, for now you can use workaround that Katya suggested.


Javascript for image sizing stopped working

Posted: Sat Nov 09, 2013 10:29 am
by Ram

Dear Alena,
thank you for your reply.

i tried Katya's workaround and that too didnt work...