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

Popular posts from this blog

linux - Using a Cron Job to check if my mod_wsgi / apache server is running and restart -

actionscript 3 - TweenLite does not work with object -

jQuery Ajax Render Fragments OR Whole Page -