CSS inside xml response in jquery ui autocomplete -
is there way give different css class part of label inside xml response? in other words label value
label: $( "name", ).text() + ", " + ( $.trim( $( "countryname", ).text() ) || "(unknown country)" ) + ", " + $( "countrycode", ).text()
i wish give different css class $( "countrycode", ).text() since wish font have smaller others (name , countryname)
is there way?
success: function( xmlresponse ) { var data = $( "geoname", xmlresponse ).map(function() { return { value: $( "name", ).text() , label: $( "name", ).text() + ", " + ( $.trim( $( "countryname", ).text() ) || "(unknown country)" ) + ", " + $( "countrycode", ).text() , id: $( "geonameid", ).text() }; }).get();
wrap in span
, give span class. since using xml, may consider using more meaningful tag , styling (unless xhtml).
Comments
Post a Comment