Andy Parker
Posts: 0
Joined: Wed Mar 27, 2013 10:21 am

Changing the size of a list image (thumbnail) in Javascript

Hi,

I'm trying to shrink the size of a list element I have but I cannot seem to make the list smaller that the thumbnail.

Can you tell me the javascript code to adjust the size of the thumbnail as well please.

I am trying to adjust the list height with the following code:

Code: Select all

$("[dsid=list2]").css('height','1'); 

many thanks

Andy.

Igor
Posts: 0
Joined: Tue Apr 02, 2013 12:05 pm

Changing the size of a list image (thumbnail) in Javascript

Hello,

You can set component "Class Name" and use CSS to apply component style.
http://docs.appery.io/documentation/w...

Andy Parker
Posts: 0
Joined: Wed Mar 27, 2013 10:21 am

Changing the size of a list image (thumbnail) in Javascript

yes, thanks, I realise that.

But I want to do this programmatically, with Javascript.

for example.

Rather than apply static height, I want to collapse the list using javascript so it can be done as an effect.

Illya Stepanov
Posts: 0
Joined: Mon Mar 18, 2013 8:48 am

Changing the size of a list image (thumbnail) in Javascript

Hi Andy,

Sorry for delay, can you provide some screenshots of your thumbnail image? Is it a custom one or are you using standard jQuery?

Andy Parker
Posts: 0
Joined: Wed Mar 27, 2013 10:21 am

Changing the size of a list image (thumbnail) in Javascript

Hi Illya,

Please see screen shot of list below with thumnails.
This is all built using standard Appery UI.
Image

Kateryna Grynko
Posts: 0
Joined: Thu Nov 15, 2012 9:13 am

Changing the size of a list image (thumbnail) in Javascript

Hi Andy,

Try the following JS code: preAppery("list2").find("img").css("height","1")/pre

Andy Parker
Posts: 0
Joined: Wed Mar 27, 2013 10:21 am

Changing the size of a list image (thumbnail) in Javascript

Thanks Katya, that shrunk the image - appreciate that.

Can you tell me why the actual list element doesn't shrink with the following code please? I presumed the image was stopping it, but now the image has shrink, I still cant seem to shrink the list item.

$("[dsid=list2]").css('height','1');

Kateryna Grynko
Posts: 0
Joined: Thu Nov 15, 2012 9:13 am

Changing the size of a list image (thumbnail) in Javascript

Andy,

Add this CSS attribute to list:preoverflow: hidden;/pre

Andy Parker
Posts: 0
Joined: Wed Mar 27, 2013 10:21 am

Changing the size of a list image (thumbnail) in Javascript

thanks Katya, still no good.

tried this several ways:

Javascript: $("[dsid=list2]").css('overflow','hidden'); //didn't work

direct CSS: .listhide_enable {overflow: hidden;} //didn't work

adding overflow as a parameter and hidden as it's value //didn't work

full code I'm using to try to achieve this:
Appery("list2").find("img").css("height","1")
$("[dsid=list2]").css("overflow","hidden");
$("[dsid=list2]").css("height","1");

All that happens is the thumbnail disappears......

Kateryna Grynko
Posts: 0
Joined: Thu Nov 15, 2012 9:13 am

Changing the size of a list image (thumbnail) in Javascript

Andy,

Is list2 a list component? What do you need to do? Do you want to set height 1px?

Return to “Issues”