Hi all,
is there a way to give a different css class to a part of the label inside the xml response?
In other words the label value now is
label: $( "name", this ).text() + ", " + ( $.trim( $( "countryName", this ).text() ) || "(unknown country)" ) + ", " + $( "countryCode", this ).text()
I wish to give a different css class only to $( "countryCode", this ).text() since I wish that this one have to be smaller than the others (name and countryName)
Is there a way?
- success: function( xmlResponse ) {
- var data = $( "geoname", xmlResponse ).map(function() {
- return {
- value: $( "name", this ).text()
- ,
- label: $( "name", this ).text() + ", " +
- ( $.trim( $( "countryName", this ).text() ) || "(unknown country)" ) + ", " +
- $( "countryCode", this ).text()
- ,
- id: $( "geonameId", this ).text()
- };
- }).get();