anon
Posts: 0
Joined: Sun Apr 13, 2014 12:10 am

CSS in mapped response

In the response mapping of a service, I am trying to add logic to format my element.

in function(value, element){
$(element).css('text-align', 'right');
}

how would I target the element in a css call?

In particular, I am trying to change the location of a label component contained inside the element

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

CSS in mapped response

Hi Benjamin -

You can use browser tools to inspect target elements: http://docs.appery.io/documentation/d...

anon
Posts: 0
Joined: Sun Apr 13, 2014 12:10 am

CSS in mapped response

Yes, but this doesn't quite answer my question as the element that comes through is from an array list. So I can't statically target an 'id'. My question is regarding syntax of such.

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

CSS in mapped response

Hi Benjamin,

You can use Appery function to access the component:preAppery('componentname').css('text-align', 'right');/pre
Same as above, just without using Appery function (straight jQuery):
pre$('div[dsid="componentname"]').css('text-align', 'right');/preorpre$("[dsid=componentname]").css('text-align', 'right'); /preWhere componentname is a name of the component.

Return to “Issues”