aboutsummaryrefslogtreecommitdiffstats
path: root/demos
diff options
context:
space:
mode:
authorScott González <scott.gonzalez@gmail.com>2010-04-21 09:57:35 -0400
committerScott González <scott.gonzalez@gmail.com>2010-04-21 09:57:35 -0400
commit32bcf56584b81172fd9882ba0c2e3b34bd9220e2 (patch)
tree76256616d8e77b5bc67353c4c3e4e6f038e2e9d5 /demos
parent6e77ee19bc1c6b8f0b4155005780f0ea18b158d1 (diff)
downloadjquery-ui-32bcf56584b81172fd9882ba0c2e3b34bd9220e2.tar.gz
jquery-ui-32bcf56584b81172fd9882ba0c2e3b34bd9220e2.zip
Autocomplete: Added custom rendering for custom data demo.
Diffstat (limited to 'demos')
-rw-r--r--demos/autocomplete/custom-data.html8
1 files changed, 7 insertions, 1 deletions
diff --git a/demos/autocomplete/custom-data.html b/demos/autocomplete/custom-data.html
index 57598fa8c..139b41d99 100644
--- a/demos/autocomplete/custom-data.html
+++ b/demos/autocomplete/custom-data.html
@@ -64,7 +64,13 @@
return false;
}
- });
+ })
+ .data( "autocomplete" )._renderItem = function( ul, item ) {
+ return $( "<li></li>" )
+ .data( "item.autocomplete", item )
+ .append( "<a>" + item.label + "<br>" + item.desc + "</a>" )
+ .appendTo( ul );
+ };
});
</script>
</head>